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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
grouppgsql-bugs @
categoriespostgresql
postedDec 10, '08 at 9:54a
activeDec 10, '08 at 4:44p
posts3
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase