Re: Problem in calling prepare statement from STORED PROCEDURE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem in calling prepare statement from STORED PROCEDURE
Дата
Msg-id 17237.1081017705@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem in calling prepare statement from STORED PROCEDURE  ("Rajat Katyal" <rajatk@intelesoftech.com>)
Список pgsql-general
"Rajat Katyal" <rajatk@intelesoftech.com> writes:
> I prepare the statement for execution as follows:
> PREPARE query(text) as SELECT count(*) FROM transform_customer_billing wher=
> e inv_no =3D $1;
> The problem is Iam not able to execute this prepare statement from the stor=
> ed procedure defined.

EXECUTE means something different in plpgsql than it does in plain SQL,
and you do not need PREPARE at all in plpgsql.  plpgsql's automatic
caching of plans gives you the effect of PREPARE on every statement
without your having to ask for it.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postgres 7.4.2: float(20) results in error msg, but should not since 7.4)
Следующее
От:
Дата:
Сообщение: thread_test.c problems