Re: Varchar standard compliance - Mailing list pgsql-hackers

From Mitch Vincent
Subject Re: Varchar standard compliance
Date
Msg-id 009101c05005$19e28cb0$0200000a@windows
Whole thread Raw
In response to Varchar standard compliance  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I've been wondering the difference in varchar and TEXT in the aspect of
length and indexing - what would happen if you tried to index a
varchar(BLCKSZ) ? I know you can index smaller portions of text (at least it
appears you can) so why not larger alphanumeric data? (I'm not complaining,
just trying to understand.)

I just made a varchar(30000) field, inserted some data into it and created
an index on it, it seemed to work OK -- is it really only indexing X
characters or something?

-Mitch

----- Original Message -----
From: "Peter Eisentraut" <peter_e@gmx.net>
To: "PostgreSQL Development" <pgsql-hackers@postgresql.org>
Sent: Thursday, November 16, 2000 10:16 AM
Subject: [HACKERS] Varchar standard compliance


> 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)?
>
> Additionally, neither CHAR nor VARCHAR seem to bark on too long input,
> they just truncate silently.
>
> I'm wondering because should the bit types be made to imitate this
> incorrect behaviour, or should they start out correctly?
>
> --
> Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/
>
>



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: AW: AW: AW: Coping with 'C' vs 'newC' function language nam esh
Next
From: Stephan Szabo
Date:
Subject: Questions on RI spec (poss. bugs)