[EMAIL PROTECTED] ("Bath, David") writes:
> Question(s):
> * Am I being realistic, or should I grit my teeth and clone code from
> trigger to trigger and column to column?
> * Is this something I should try and do using domains, types and
> cast functions from "text" or some horrible combinatio
[EMAIL PROTECTED] ("Greg Patnude") writes:
> Data validation and purification should be performed at the
> application layer -- you should format your data appropriately
> BEFORE trying any INSERT/UPDATE operations.
It seems to me that one might create some stored functions that can do
some valida
On Fri, Aug 26, 2005 at 13:04:10 +1000,
> Desired Outcome(s):
> * I would like to have the convenience of declaring a column that obeys
> a constraint (similar to using a domain), but allows a "tidy-up" as the
> value is created BEFORE asserting the constraint. This *might* be
> termed a "do
rsday, August 25, 2005 8:04 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Tidying values on variable instantiation
Folks,
Preamble:
* I can create a check constraint on a column or domain that enforces
"no leading or trailing whitespace". Imagine that the domain is
called "trim
Desired Outcome(s):
* I would like to have the convenience of declaring a column that obeys
a constraint (similar to using a domain), but allows a "tidy-up" as the
value is created BEFORE asserting the constraint. This *might* be
termed a "domain trigger". (Perhaps even a WORM is possible!).
On Aug 26, 2005, at 12:04 PM, Bath, David wrote:
Desired Outcome(s):
* I would like to have the convenience of declaring a column that
obeys
a constraint (similar to using a domain), but allows a "tidy-up"
as the
value is created BEFORE asserting the constraint. This *might* be
term
Folks,
Preamble:
* I can create a check constraint on a column or domain that enforces
"no leading or trailing whitespace". Imagine that the domain is
called "trimmed_varchar"
* I can create plpgsql function/triggers that "tidy" up incoming varchars,
trimming the offending whitespaces, on a