Re: dynamic SQL - variable substitution in plpgsql

Поиск
Список
Период
Сортировка
От Tony Caduto
Тема Re: dynamic SQL - variable substitution in plpgsql
Дата
Msg-id 45772921.7050802@amsoftwaredesign.com
обсуждение исходный текст
Ответ на dynamic SQL - variable substitution in plpgsql  (km <km@mrna.tn.nic.in>)
Список pgsql-general
km wrote:
> Hi all,
>
> i could not do variable substitution in plpgsql procedure.
> The variable names are taken as it is but not substituted in the SQL query.
> what could be the problem ?
>
>
> FOR result IN "SELECT x,y,z FROM mydata WHERE x = a AND y < b AND z > c" LOOP
>     RETURN NEXT  result;
>
I don't think you need the quotes around your select statement.

Later,

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


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

Предыдущее
От: Bob Pawley
Дата:
Сообщение: Re: PG Admin
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Restore database from files (not dump files)?