Re: Limited varchar, unlimited varchar, or text?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Ayers <aayers(at)eldocomp(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Limited varchar, unlimited varchar, or text?
Date: 2003-07-24 17:48:18
Message-ID: 11677.1059068898@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrew Ayers <aayers(at)eldocomp(dot)com> writes:
> Then people say "there is no difference, internally it is the same to PG".
> So - why the two types?

History. TEXT was there first, VARCHAR was added for spec compliance.

> Personally, if such a change were to come about, I would lean toward
> adding the "TEXT(x)" to the system, and deprecating VARCHAR. Leave both
> in for a few versions, then rip VARCHAR support out. Why?

I can show you where the SQL spec says that we're not doing that.

I have myself been wondering if we couldn't converge the TEXT and
VARCHAR types some more, but we're not likely to remove either one.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Yu 2003-07-24 17:54:00 Re: Solaris, Postgresql and Problems
Previous Message Vivek Khera 2003-07-24 17:48:03 Re: dump_all/restore times?