Re: [GENERAL] Default values, inserts, and rules...

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Default values, inserts, and rules...
Date: 2002-08-22 07:30:59
Message-ID: 20020822073059.GL46902@ninja1.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Bartley 2002-08-22 08:42:01 pg_statistic_relid_att_index
Previous Message pgsql-bugs 2002-08-22 07:19:10 Bug #741: postgresql and cygwin

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Bartley 2002-08-22 08:42:01 pg_statistic_relid_att_index
Previous Message Oliver Elphick 2002-08-22 06:39:20 Re: Primary Keys