Search code examples
postgresqlsqldatatypesuser-defined-types

What is the maximum size of a column of custom data type in Postgresql database?


I'm creating a custom data type in Postgresql. The column of this type is going to hold enormous amount of data in each row and the data will increase over time. If you know about the custom types in Postgresql, then you must also know that we have to specify internal length as variable in the create type statement if the type's size can't be determined beforehand. I have done the same for my type. So, if I create a column of this data type, how much data can be possibly stored in the column of a single row ?


Solution

  • Field Size: 1GB

    TOASTed fields can be at most 1 GB.

    This comes straight from the PostgreSQL documentation.