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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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