Re: triggers vs "NEW" pseudorecord - Mailing list pgsql-general

From Jan Wieck
Subject Re: triggers vs "NEW" pseudorecord
Date
Msg-id 200103041207.HAA02349@jupiter.jw.home
Whole thread Raw
In response to triggers vs "NEW" pseudorecord  (will trillich <will@serensoft.com>)
Responses Re: triggers vs "NEW" pseudorecord  (will trillich <will@serensoft.com>)
List pgsql-general
will trillich wrote:
> okay. postgres 7.0.3 here, on debian potato/stable.

    OK - so far.

> [...]
>
> so altho the docs elsewhere say NOT to rely on access to the
> pseudo table NEW within a trigger function, this part does work
> like it should. but when i add SELECT or UPDATE it complains of
> "NEW used in non-RULE query" -- what's the distinction?

    Can't  reproduce  such an error here - neither with 7.0.3 nor
    with 7.1.  Could you please post  a  complete,  reproduceable
    example   of   the   failure.    Tables,  functions,  trigger
    declarations, queries.

>
> what types of operations are NOT LEGAL within such a
> trigger-invoked function? (i'd like to be able to UPDATE other
> tables and SELECT from various tables within the function. bad
> dog?)

    That's definitely possible and the PL/pgSQL  regression  test
    suite does it.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: can a trigger on insert -> update other tables?
Next
From: brichard@cafod.org.uk (Bruce Richardson)
Date:
Subject: CREATE INDEX function limitation