Re: [GENERAL] rewriting values with before trigger - Mailing list pgsql-sql

From Tom Lane
Subject Re: [GENERAL] rewriting values with before trigger
Date
Msg-id 24274.1051221741@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] rewriting values with before trigger  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-sql
Robert Treat <xzilla@users.sourceforge.net> writes:
> yeah, I've thought of some other crazy ways to get around this, but the
> problem is due to a bug in the application side. I was hoping I could
> write a quick hack (like adding a rule/trigger) to get around this until
> the app was fixed, but I'm not going to make my side a kludge when it
> isn't one now.

The only way I can see to do it is to make a view that has 'text'
datatypes in place of real ones, with an ON INSERT rule that invokes
your conversion functions and then inserts the result to the real table.
Dunno if that's too high on your kluge meter.

            regards, tom lane


pgsql-sql by date:

Previous
From: Robert Treat
Date:
Subject: Re: [GENERAL] rewriting values with before trigger
Next
From: Robert Treat
Date:
Subject: Re: [GENERAL] rewriting values with before trigger