From: | Terry Lee Tucker <terry(at)chosen-ones(dot)org> |
---|---|
To: | POSTGRESQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: varchar lengths |
Date: | 2010-09-21 11:29:27 |
Message-ID: | 201009210729.27714.terry@chosen-ones.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tuesday, September 21, 2010 07:23:45 Massa, Harald Armin wrote:
> I recommend to use TEXT as type for that kind of columns.
> 99 out of 100 theories about "this value will never be longer then xx
> characters" fail in the long run.
>
> And "text", limited only by PostgreSQLs limits, performs as good or
> better then varchar(length_limit) The time of "we only can allow n
> chars for first name" for performance reasons have gone by, together
> with walkmen and VHS.
>
>
> Harald
Also, if you are absolutely set on a constraint on the length of the text, you
can use a trigger for this and when the constraint changes, and it will, you
simply modify the trigger.
--
Terry Lee Tucker
tel: (336) 372-5432; cell: (336) 404-6897
terry(at)chosen-ones(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Marcus Engene | 2010-09-21 11:54:13 | Re: varchar lengths |
Previous Message | Massa, Harald Armin | 2010-09-21 11:23:45 | Re: varchar lengths |