Query with Parameters

Поиск
Список
Период
Сортировка
От Evil Azrael
Тема Query with Parameters
Дата
Msg-id 169124879927.20020206175323@evilazrael.de
обсуждение исходный текст
Ответы Re: Query with Parameters  (Ian Barwick <barwick@gmx.net>)
Re: Query with Parameters  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
Список pgsql-sql
Hello!

I hope this question was not asked before.

What i need is SELECT with parameters. Afaik Views don´t take
parameters and functions can´t return multiple tuples. Am i right? Or
have i overseen something in the documentation or in the 1.8 million
pages about PgSQL which Google.com knows?

My main problem is that i have a complex query in which very often the
same tables and fields are being used. A simple SQL-function would be
very handy, but how do i return multiple records at the same time?

as a simple example, is a function like this possible?
SELECT funktion('field','table');
where funktion is implemented like this :
SELECT $1 FROM $2;


Thanks for any answer in advance

Christoph Nelles
evilazrael@evilazrael.de


-- 
Mit freundlichen Grüssen
Evil Azrael                            mailto:evilazrael@evilazrael.de



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: indexes
Следующее
От: Vivek Khera
Дата:
Сообщение: Re: WAL filling up disk