Executing dynamic queries without functions / procedures

Поиск
Список
Период
Сортировка
От Nicholas Bott
Тема Executing dynamic queries without functions / procedures
Дата
Msg-id 46450019.6090005@zordiac.com
обсуждение исходный текст
Ответы Re: Executing dynamic queries without functions / procedures  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Is it possible to execute a dynamic query similarly to MS SQL, like so:
IF EXISTS(SELECT * FROM Table WHERE Condition)
DO SOMETHING

I would like to use the PL language in conjunction with conditional statements, outside of a procedure or function.  This doesn't seem to be possible from what I've read so far and I wanted to confirm.

Also, if it's not natively possible - is there some kind of hack?  For example, creating temporary procedures to establish the same result, then removing them periodically?

Thanks much.
--
Nicholas Bott

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: noob trying to use PG with Zope
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Executing dynamic queries without functions / procedures