Re: varchar lengths - Mailing list pgsql-general

From Arjen Nienhuis
Subject Re: varchar lengths
Date
Msg-id AANLkTimn_2XatLiQf5jE_U116txEQHs=Gp6g680tuc8C@mail.gmail.com
Whole thread Raw
In response to Re: varchar lengths  ("Massa, Harald Armin" <chef@ghum.de>)
Responses Re: varchar lengths  ("Massa, Harald Armin" <chef@ghum.de>)
List pgsql-general
On Tue, Sep 21, 2010 at 1:23 PM, Massa, Harald Armin <chef@ghum.de> 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.

You do need to be wary of malicious users who put a first name of a few hundred megabytes.

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: where does postgres keep the query result until it is returned?
Next
From: "Christopher Gorge A. Marges"
Date:
Subject: Reclaiming space