Re: Case Insensitive Data Type - Mailing list pgsql-general

From Tom Lane
Subject Re: Case Insensitive Data Type
Date
Msg-id 20803.1022270562@sss.pgh.pa.us
Whole thread Raw
In response to Re: Case Insensitive Data Type  (Darren Ferguson <darren@crystalballinc.com>)
Responses Re: Case Insensitive Data Type
List pgsql-general
Darren Ferguson <darren@crystalballinc.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

pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: problem with my function
Next
From: Tom Lane
Date:
Subject: Re: Altering existing table to be WITHOUT OIDs