Re: [PLPGSQL] PERFORM into an EXECUTE allowed ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Baguette <bruno(dot)baguette(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [PLPGSQL] PERFORM into an EXECUTE allowed ?
Date: 2008-10-27 04:16:24
Message-ID: 604.1225080984@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Baguette <bruno(dot)baguette(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2008-10-27 07:34:16 Re: Are there plans to add data compression feature to postgresql?
Previous Message Bruno Baguette 2008-10-27 03:39:03 [PLPGSQL] PERFORM into an EXECUTE allowed ?