Hello !
I'm trying to build a PL/PGSQL function trigger.
When the function is triggered, PostgreSQL complains about an error at
or near PEFORM.
Here's the piece of code :
EXECUTE 'PERFORM COUNT(*)'
|| ' FROM ' || quote_ident(TG_RELNAME)
|| ' GROUP BY ' || quote_ident(column_name_to_check)
|| ' HAVING COUNT(*) > 1';
The next lines of code don't check for the value (so, PERFORM), but just
do some action IF FOUND. Table and column to check are dynamic and comes
from the trigger, that's why I use EXECUTE.
Is it allowed to do a PERFORM into an EXECUTE ? I didn't see any notes
about such limitation in the doc, but I ask in case of... :-/
Many thanks in advance !
Regards,
--
Bruno Baguette - bruno.baguette@xxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general