Re: Varchar Vs. Text index matching - why different?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Varchar Vs. Text index matching - why different?
Date: 2003-03-20 15:18:12
Message-ID: 23364.1048173492@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> I just noticed that comparing a text to a varchar results in an index not
> being used without a cast in some circumstances. Given that they have
> identical internal representations (or so I believe), that seems a little odd.

But they're not the same datatype.

I have been wondering whether we couldn't eliminate the datatype
distinction between text and varchar. Haven't gotten around to thinking
about it though; the mess in the numeric-datatype world seems higher
priority.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-20 15:19:12 Re: Open 7.4 features
Previous Message Tom Lane 2003-03-20 14:55:03 Re: string || NULL ambiguity