[GENERAL] execute/perform and FOUND

2006-09-21 Thread Karsten Hilbert
Hi, I am utterly confused now. Running the attached script on Debian: postgresql: Installiert:7.5.21 Mögliche Pakete:7.5.21 Versions-Tabelle: *** 7.5.21 0 990 ftp://ftp.gwdg.de testing/main Packages 100 /var/lib/dpkg/status 7.4.7-6sarge3 0 500

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Karsten Hilbert
On Thu, Sep 21, 2006 at 01:06:32PM +0200, Karsten Hilbert wrote: I am utterly confused now. Running the attached script on Debian: postgresql: Installiert:7.5.21 Mögliche Pakete:7.5.21 Versions-Tabelle: *** 7.5.21 0 990 ftp://ftp.gwdg.de testing/main Packages 100

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Karsten Hilbert
On Thu, Sep 21, 2006 at 01:06:32PM +0200, Karsten Hilbert wrote: gives the result below. It seems inconsistent to me with regard to the FOUND variable. I would expect FOUND to always be false regardless of whether I use EXECUTE or PERFORM. I certainly do not expect it to be true for the third

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Martijn van Oosterhout
On Thu, Sep 21, 2006 at 01:15:46PM +0200, Karsten Hilbert wrote: Assuming EXECUTE does not touch FOUND at all the EXECUTE part behaves consistently (namely default FOUND=FALSE at the beginning and later whatever it was after the PERFORM). So, what about the PERFORM ? Why does it set FOUND

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Karsten Hilbert
On Thu, Sep 21, 2006 at 01:32:02PM +0200, Martijn van Oosterhout wrote: So, what about the PERFORM ? Why does it set FOUND to true? I beleive that since PERFORM doesn't return anything, it sets the FOUND variable to at least indicate whether it did something. The docs say that it sets

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Karsten Hilbert
On Thu, Sep 21, 2006 at 01:32:02PM +0200, Martijn van Oosterhout wrote: I beleive that since PERFORM doesn't return anything, it sets the FOUND variable to at least indicate whether it did something. The weird thing is that in the example it sets FOUND to true even if it did NOT do anything.

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Marcin Mank
gives the result below. It seems inconsistent to me with regard to the FOUND variable. I would expect FOUND to always be false regardless of whether I use EXECUTE or PERFORM. I certainly do not expect it to be true for the third EXECUTE even assuming that PERFORM may have a bug. What is it

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Karsten Hilbert
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

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Tom Lane
Karsten Hilbert [EMAIL PROTECTED] writes: 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