Re: Varchar standard compliance

From: "Mitch Vincent" <mitch(at)venux(dot)net>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Varchar standard compliance
Date: 2000-11-16 19:40:39
Message-ID: 009101c05005$19e28cb0$0200000a@windows
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net>
To: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)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(at)gmx(dot)net http://yi.org/peter-e/
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2000-11-16 19:49:40 Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Previous Message Don Baccus 2000-11-16 19:36:34 Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)