Re: A modest proposal for a FAQ addition

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ian Barwick <barwick(at)gmx(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: A modest proposal for a FAQ addition
Date: 2003-01-15 18:06:17
Message-ID: 200301151806.h0FI6Hh28255@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Ian Barwick <barwick(at)gmx(dot)net> writes:
> > On Sunday 12 January 2003 17:55, Bruce Momjian wrote:
> >> I can't say "don't use CHAR(n)" because there are valid reasons to use
> >> it.
>
> > I think what Tom is saying is "always use VARCHAR(n) unless you know
> > for sure CHAR(n) is what you want, because if you slept through that part of
> > the SQL course CHAR(n) is not what you might think."
>
> Yes. It is not clear from either the FAQ or the documentation that
> CHAR() should not be one's default choice for a character field.

I think part of our problem is that we say CHAR() first, then VARCHAR(),
in the docs and the FAQ. This of course suggests to look at CHAR()
first, then VARCHAR(), which is wrong. I have fixed the FAQ, and now
the SGML docs. I think this will help.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-01-15 19:05:43 Re: copying perms to another user
Previous Message Fernando Nasser 2003-01-15 17:52:28 Re: SQL flagger