Re: [SQL] rewriting values with before trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: gearond(at)cvc(dot)net, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] rewriting values with before trigger
Date: 2003-04-24 22:02:21
Message-ID: 24274.1051221741@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Robert Treat <xzilla(at)users(dot)sourceforge(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2003-04-24 22:02:33 Re: pl-pgsql question
Previous Message Tom Lane 2003-04-24 21:58:35 Re: has_table_priviledge

Browse pgsql-sql by date

  From Date Subject
Next Message elein 2003-04-25 00:28:28 Re: [SQL] rewriting values with before trigger
Previous Message Nigel J. Andrews 2003-04-24 21:53:14 Re: [SQL] rewriting values with before trigger