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" <[EMAIL PROTECTED]>
To: "PostgreSQL Development" <[EMAIL PROTECTED]>
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      [EMAIL PROTECTED]       http://yi.org/peter-e/
>
>

Reply via email to