Re: New.* and old.* as function arguments within rules

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: New.* and old.* as function arguments within rules
Date: 2005-12-03 17:15:52
Message-ID: 1133630152l.28211l.0l@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 12/03/2005 01:43:38 AM, Andreas Kretschmer wrote:
> Karl O. Pinc <kop(at)meme(dot)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(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karl O. Pinc 2005-12-03 17:22:58 Re: Regular Expression Question
Previous Message Tom Lane 2005-12-03 16:43:00 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits