Search Postgresql Archives

[PLPGSQL] PERFORM into an EXECUTE allowed ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux