Re: execute/perform and FOUND

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: execute/perform and FOUND
Date: 2006-09-21 12:59:56
Message-ID: 20060921125956.GI10331@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 21, 2006 at 02:50:08PM +0200, Marcin Mank wrote:

> With:
>
> perform cmd;
> raise notice ''found (perform): %'', found;
>
> You effectively do:
> select 'select 1 from test where fk_item=1324314' ;
>
>
> Try:
>
> perform 1 from test where fk_item=1324314

Marcin, you saved my day. I knew I was being stupid
somewhere. It's not like I never used PERFORM before but,
hey, there you go :-))

The docs do hint at how to do it properly:

"PERFORM create_mv(''cs_session_page_requests_mv'', my_query);"

but this might be helpful to be pointed out explicitely:

"PERFORM create_mv(''cs_session_page_requests_mv'', my_query);

Note that the PERFORM replaces the SELECT in the query."

Thanks,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brad Nicholson 2006-09-21 13:47:04 Re: postgresql rising
Previous Message Marcin Mank 2006-09-21 12:50:08 Re: execute/perform and FOUND