pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
Cc: pgsql-admin@postgresql.org
Subject: Re: Mysql to postgres
Date: Mon, 11 Apr 2005 03:02:01 -0400
Message-ID: <22593.1113202921@sss.pgh.pa.us> (raw)
In-Reply-To: <D1444817B78AB546BF2896C2B70E7F04371FF1@ganesh.au.lpint.net>
References: <D1444817B78AB546BF2896C2B70E7F04371FF1@ganesh.au.lpint.net>

Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au> writes:
> There may be a way to change the database in postgres to be case
> insensitive. i.e. change some of the operations such as "text=text" to be
> case insensitive. Does this sound Insane?

I think it would be exceedingly unwise to muck with the standard
behavior of a commonly used datatype.  What some other people have
done is to invent a variant datatype "citext" that shares most of the
same operations as "text", but has case-insensitive comparisons.
Then you only need to hack your table definitions, not your application
code.

http://gborg.postgresql.org/project/citext/projdisplay.php

I think you could probably also do it by building a locale whose
comparisons are case-insensitive, but I don't know enough about
locales to be sure.

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <22593.1113202921@sss.pgh.pa.us>
Permalink:  ../22593.1113202921@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22593.1113202921@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Theo.Galanakis@lonelyplanet.com.au
  Subject: Re: Mysql to postgres
  In-Reply-To: <22593.1113202921@sss.pgh.pa.us>
  References: <D1444817B78AB546BF2896C2B70E7F04371FF1@ganesh.au.lpint.net> <22593.1113202921@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox