Re: [PLPGSQL] PERFORM into an EXECUTE allowed ? - Mailing list pgsql-general

From Tom Lane
Subject Re: [PLPGSQL] PERFORM into an EXECUTE allowed ?
Date
Msg-id 604.1225080984@sss.pgh.pa.us
Whole thread Raw
In response to [PLPGSQL] PERFORM into an EXECUTE allowed ?  (Bruno Baguette <bruno.baguette@gmail.com>)
Responses Re: [PLPGSQL] PERFORM into an EXECUTE allowed ?
List pgsql-general
Bruno Baguette <bruno.baguette@gmail.com> writes:
> EXECUTE 'PERFORM COUNT(*)'
>       || ' FROM ' || quote_ident(TG_RELNAME)
>       || ' GROUP BY ' || quote_ident(column_name_to_check)
>       || ' HAVING COUNT(*) > 1';

PERFORM is a plpgsql keyword, not a SQL keyword, so it's not surprising
that this fails.  What I'm wondering is what exactly you hope the above
will accomplish?  Why would you want to execute this query only to have
the results discarded?

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Baguette
Date:
Subject: [PLPGSQL] PERFORM into an EXECUTE allowed ?
Next
From: Ron Mayer
Date:
Subject: Re: Are there plans to add data compression feature to postgresql?