I am unable to set the max size of particular column in PostgreSQL with MAX
keyword. Is there any keyword like MAX
. If not how can we create the column with the maximum size?
If you want to created an "unbounded" varchar
column just use varchar
without a length restriction.
If character varying is used without length specifier, the type accepts strings of any size
So you can use:
create table foo
(
unlimited varchar
);
Another alternative is to use text
:
create table foo
(
unlimited text
);
More details about character data types are in the manual:
http://www.postgresql.org/docs/current/static/datatype-character.html