Re: PERFORM statement inside procedure

Поиск
Список
Период
Сортировка
От Rajat Katyal
Тема Re: PERFORM statement inside procedure
Дата
Msg-id 000701c41c72$39dbc490$2105a8c0@bgdev001
обсуждение исходный текст
Ответ на PERFORM statement inside procedure  ("Rajat Katyal" <rajatk@intelesoftech.com>)
Ответы Re: PERFORM statement inside procedure  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Actually my problem is PERFORM is not updating the FOUND variable to false
even when my query return no rows. Can you please tell me the better way to
use PERFORM so that by running my select query I just come to know whether
it returns 0 rows or not.

Regards,
Rajat.
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Rajat Katyal" <rajatk@intelesoftech.com>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, April 07, 2004 11:15 AM
Subject: Re: [GENERAL] PERFORM statement inside procedure


> "Rajat Katyal" <rajatk@intelesoftech.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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.4.1 & invalid page header in block
Следующее
От: Cyrille Gautard
Дата:
Сообщение: Informations about functions ...