SQL:

CREATE OR REPLACE FUNCTION "bug_with_triggers" () RETURNS trigger AS
$body$
BEGIN
        PERFORM COALESCE(NEW.some_composite_field.field, TRUE);
END;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;

Error:

ERROR:  NEW used in query that is not in a rule
QUERY:  SELECT  COALESCE(NEW.somecompositefield.field, TRUE)
CONTEXT:  SQL statement in PL/PgSQL function "bug_with_triggers" near line 2


********** ERROR **********

ERROR: NEW used in query that is not in a rule
SQL state: 42601
Контекст:SQL statement in PL/PgSQL function "bug_with_triggers" near line 2

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to