Re: PERFORM statement inside procedure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rajat Katyal" <rajatk(at)intelesoftech(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PERFORM statement inside procedure
Date: 2004-04-07 05:45:25
Message-ID: 5890.1081316725@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Rajat Katyal" <rajatk(at)intelesoftech(dot)com> writes:
> checkPKSql := ''select * from "transform_customer_billing" '';
> checkPKSql := checkPKSql || '' where "inv_no" = '' || quote_literal(new=
> ."inv_no");
> PERFORM checkPKSql;

You seem to be confusing PERFORM with EXECUTE. They are very different.
The above PERFORM is really equivalent to
SELECT 'select ...';
which naturally yields a row containing a not-very-useful string value.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-04-07 06:15:41 Re: 7.4.1 & invalid page header in block
Previous Message David Garamond 2004-04-07 04:58:35 BYTEA maximum sizes (Re: Storing jpgs)