Re: New.* and old.* as function arguments within rules - Mailing list pgsql-general

From Karl O. Pinc
Subject Re: New.* and old.* as function arguments within rules
Date
Msg-id 1133630152l.28211l.0l@mofo
Whole thread Raw
In response to Re: New.* and old.* as function arguments within rules  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: New.* and old.* as function arguments within rules
List pgsql-general
On 12/03/2005 01:43:38 AM, Andreas Kretschmer wrote:
> Karl O. Pinc <kop@meme.com> schrieb:
>
> > Hi,
> >
> > I'm trying to make sure I understand what I'm doing.
> >
> > Where is new.* and old.* documented, as regards
> > using them as arguments to functions called from
> > rules?  If it's not documented then can I rely
on the behavior?
>
> http://www.postgresql.org/docs/8.1/interactive/triggers.html

Thanks for the reply but I've obviously got some big
misunderstanding here.

1st, the docs above refer to triggers, not rules.  AFIK
rules are a completely different animal.

2nd, nowhere have I found a NEW.* syntax (as written).
NEW (or OLD) seems to be a complete rowtype (or maybe
recordtype), as far as triggers go anyway, and there's
no explaination of what .* might mean in the context
of a rowtype.

Finally, the syntax seems to have something to do
with calling functions.

See: http://archives.postgresql.org/pgsql-general/2005-08/msg00653.php
Which is what I found searching the archives trying to
figure out the best way to pass data in NEW and OLD
to functions called from within rules.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Regular Expression Question