From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | "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 18:38:14 |
Message-ID: | 1051209495.7747.544.camel@camel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On Thu, 2003-04-24 at 12:39, Josh Berkus wrote:
> Robert,
>
> > Is there anyway to do be able to change the '' into NULL before data
> > validity is checked with a trigger?
>
> What about using a RULE instead?
>
RULE's follow this same behavior, erroring out if the data is not a
valid timestamp. (At least I've not been able to write a rule that
doesn't follow this) In fact you actually can't create the rule if you
have a where clause that isn't a proper matching datatype.
I seem to recall a solution for folks who need '' to represent 0 in int
fields was to use triggers or rules, but I guess that really isn't
possible :-(
Robert Treat
From | Date | Subject | |
---|---|---|---|
Next Message | Vernon | 2003-04-24 18:40:25 | Fwd: Unicode, RedHat Linux, & PostgreSQL |
Previous Message | Stephan Szabo | 2003-04-24 17:57:32 | Re: Factoring where clauses through UNIONS take 2 |
From | Date | Subject | |
---|---|---|---|
Next Message | Vernon | 2003-04-24 18:40:25 | Fwd: Unicode, RedHat Linux, & PostgreSQL |
Previous Message | Nigel J. Andrews | 2003-04-24 16:46:01 | Re: rewriting values with before trigger |