The PostgreSQL Dialect sets, by default, a 255 character limit on the 'varchar' type. In the wonderful world of Postgres, however, a varchar without a length specification can be arbitrarily large (up to the limits of the data type, which is about 1GB).
Quote:
The notations varchar(n) and char(n) are aliases for character varying(n) and character(n), respectively. character without length specifier is equivalent to character(1). If character varying is used without length specifier, the type accepts strings of any size. The latter is a PostgreSQL extension.
(
http://www.postgresql.org/docs/8.0/inte ... acter.html)
Given that I consider this a feature, not a bug, is there a way to unset this default? (e.g. 'CREATE TABLE T1 (TID int, TVALUE varchar);' instead of 'CREATE TABLE T1 (TID int, TVALUE varchar(255));') While I can explicitly set this to a large value, it would be far simpler for the Hibernate PostgreSQL dialect to assume the developer who is using this database understands, accepts, and expects this particularly powerful PostgreSQL extension.
Thanks in advance,
Foo