Skip site navigation (1) Skip section navigation (2)

Re: Disadvantages to using "text"

From: "Obe, Regina" <robe(dot)dnd(at)cityofboston(dot)gov>
To: "Greg Cocks" <gcocks(at)stoller(dot)com>,"PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Disadvantages to using "text"
Date: 2008-05-07 19:15:08
Message-ID: 53F9CF533E1AA14EA1F8C5C08ABC08D20197A070@ZDND.DND.boston.cob (view raw or flat)
Thread:
Lists: pgsql-novice
The other disadvantage I have noticed is that you can't override operator behavior of text but you can for varchar.
 
So I have been able to override the case sensitivity of varchar fields (which is annoying when working with MS Access etc)  simply by changing the way LIKE, = > etc.  are handled for varchar.  Since text is defined in pg_catalog, it doesn't seem possible to override it or at least haven't had any success with that.  Maybe I am missing something.
 
Thanks,
Regina
 

________________________________

From: pgsql-novice-owner(at)postgresql(dot)org on behalf of Greg Cocks
Sent: Wed 5/7/2008 1:48 PM
To: PostgreSQL List - Novice
Subject: Re: [NOVICE] Disadvantages to using "text"



One disadvantage is that if you are using MS Access as a front-end via
ODBC / linked tables, you can not do joins on fields set as text (in
queries, etc)


-----Original Message-----
From: Frank Bax [mailto:fbax(at)sympatico(dot)ca]
Sent: Wednesday, May 07, 2008 10:55 AM
To: PostgreSQL List - Novice
Subject: Re: [NOVICE] Disadvantages to using "text"

Aurynn Shaw wrote:
> Internally, Postgres treats a VARCHAR(n) as a TEXT with a CHECK
> constraint applied to it, so VARCHAR is going to be slightly slower to
use.


Don't you mean VARCHAR(n) will be slightly slower on UPDATES.

--
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

--
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice




-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

In response to

pgsql-novice by date

Next:From: Aurynn ShawDate: 2008-05-07 19:19:47
Subject: Re: Disadvantages to using "text"
Previous:From: Bruce MomjianDate: 2008-05-07 18:46:28
Subject: Re: [NOVICE] encoding problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group