From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Varchar standard compliance |
Date: | 2000-11-17 15:57:09 |
Message-ID: | Pine.LNX.4.21.0011171652590.789-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane writes:
> > Currently, CHAR is correctly interpreted as CHAR(1), but VARCHAR is
> > incorrectly interpreted as VARCHAR(<infinity>). Any reason for that,
> > besides the fact that it of course makes much more sense than VARCHAR(1)?
>
> On what grounds do you claim that behavior is incorrect?
Because SQL says so:
<character string type> ::=
CHARACTER [ <left paren> <length> <right paren> ]
| CHAR [ <left paren> <length> <right paren> ]
| CHARACTER VARYING <left paren> <length> <right paren>
| CHAR VARYING <left paren> <length> <right paren>
| VARCHAR <left paren> <length> <right paren>
4) If <length> is omitted, then a <length> of 1 is implicit.
It doesn't make much sense to me either, but it's consistent with the
overall SQL attitude of "no anythings of possibly unlimited length".
If we want to keep this, then there would really be no difference between
VARCHAR and TEXT, right?
I'm not partial to either side, but I wanted to know what the bit types
should do.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas SB | 2000-11-17 16:05:46 | AW: Coping with 'C' vs 'newC' function language names |
Previous Message | Thomas Lockhart | 2000-11-17 15:45:37 | Database startup info |