Re: Disadvantages to using "text" - Mailing list pgsql-novice

From Bruce Hyatt
Subject Re: Disadvantages to using "text"
Date
Msg-id 694890.72880.qm@web34405.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Disadvantages to using "text"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
> Well, all the textual operators/functions are actually
> declared to take
> and return type TEXT, so when you are working with VARCHAR
> columns the
> expressions have no-op cast nodes in them ("RelabelType"
> nodes), even
> if it's an unconstrained-length VARCHAR.  I'm not sure whether
> the
> execution cost of these would be measurable in real
> applications, but
> it's not zero.  A bigger problem is that sometimes the planner
> gets
> confused by the RelabelTypes and fails to find as good a plan
> as it
> finds for a pure-TEXT query.

I assume this is true for version 7 as well as version 8.

Bruce


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

pgsql-novice by date:

Previous
From: Aurynn Shaw
Date:
Subject: Re: Disadvantages to using "text"
Next
From: Mary Anderson
Date:
Subject: Is there a trace facility for postgres/php?