Re: Case Insensitive Data Type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Darren Ferguson <darren(at)crystalballinc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Case Insensitive Data Type
Date: 2002-05-24 20:02:42
Message-ID: 20803.1022270562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Darren Ferguson <darren(at)crystalballinc(dot)com> writes:
> Could / Would it be very difficult to add ON SELECT triggers to Postgres?

Don't see that it would help you. An ON SELECT trigger would presumably
fire when a row is selected --- but you are trying to alter the
selection conditions, and cause rows to be selected that would *not* be
normally. There is no place for a trigger to fire to make that happen.

Note that it'd be easy enough for a rule to add lower() to the reference
to email --- really all you're doing there is making a view that
replaces the email column with a lowercased version of it. But I don't
see a way for a rule to rewrite the query to lower-case the literal
constant being compared to email. Can anyone see a way to do it?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-24 20:06:13 Re: Altering existing table to be WITHOUT OIDs
Previous Message Darren Ferguson 2002-05-24 19:55:44 Re: problem with my function