Re: Varchar vs varchar(64)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "Rob Richardson *EXTERN*" <Rob(dot)Richardson(at)rad-con(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Varchar vs varchar(64)
Date: 2008-10-21 17:01:17
Message-ID: 27391.1224608477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
> Rob Richardson wrote:
>> Are there other reasons to use
>> varchar(64) instead of varchar?

> You can't have "varchar" without a length in parentheses,
> as far as I know.

That's what the spec says and that's what some other implementations
require, but not Postgres. We treat varchar without a length as pretty
much just an alias for text.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-10-21 17:40:33 Re: exposing more parse was: Re: tsearch2: setting weights on tsquery
Previous Message Robert Treat 2008-10-21 16:46:03 Re: How to free disk space