Обсуждение: Results from EXECUTE

Поиск
Список
Период
Сортировка

Results from EXECUTE

От
"Alexander M. Pravking"
Дата:
How can I obtain results from an EXECUTE statement
within a pl/PgSQL function?

E.g., something like
value := EXECUTE ''SELECT '' || quote_ident(field_name) || '' FROM ...'';


Thanks in advice.

-- 
Fduch M. Pravking


Re: Results from EXECUTE

От
Janning Vygen
Дата:
Am Freitag, 16. August 2002 18:26 schrieb Alexander M. Pravking:
> How can I obtain results from an EXECUTE statement
> within a pl/PgSQL function?

From the docs: plpgsql-statements.html  postgres 7.2.1

"The results from SELECT queries are discarded by EXECUTE, and SELECT 
INTO is not currently supported within EXECUTE. So, the only way to 
extract a result from a dynamically-created SELECT is to use the
FOR-IN-EXECUTE form described later."

Look at the example in the docs.

janning

-- 
Planwerk 6 /websolutions
Herzogstrasse 86
40215 Duesseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de