Re: [GENERAL] Default values, inserts, and rules... - Mailing list pgsql-bugs

From Sean Chittenden
Subject Re: [GENERAL] Default values, inserts, and rules...
Date
Msg-id 20020822073059.GL46902@ninja1.internal
Whole thread Raw
In response to Re: Default values, inserts, and rules...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> Rules do not operate on individual tuples --- a rule is a textual
> transformation on the whole query before it ever gets executed at
> all.  What gets substituted into the INSERT command in your rule is
> not any specific tuple's value, but the NEXTVAL()-containing
> expression.

That makes loads of sense.  I thought it did its transformations
further down in the process and on individual tuples as opposed to a
wholistic rewrite of the query.  Using rules would've worked had I not
tried to be clever with tracing transaction histories through tags.
:-/ Guess it's no biggie though... rules just are so elegant compared
to triggers.  :~)

-sc


PS I converted everything to use schemas tonight and I can't applaud
the efforts enough: they really clean up the database and make things
much usable.  The output of psql is also much easier on the eyes for
large and complex schemas.

--
Sean Chittenden

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #741: postgresql and cygwin
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #742: 7.2.1 createdb test gives segmentation fault