How to use the "setof" of CREATE FUNCTION

Поиск
Список
Период
Сортировка
От Fabien Thiriet
Тема How to use the "setof" of CREATE FUNCTION
Дата
Msg-id 4.1.20000830165557.00c8c100@pop.imaginet.fr
обсуждение исходный текст
Ответы Re: How to use the "setof" of CREATE FUNCTION  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,
 I am trying to use the CREATE FUNCTION in order to process multiple
calculation, and forward at the end multiple instances.

This is the SQL statement I am using:

CREATE FUNCTION foo(varchar) RETURNS setof myTable
AS 'UPDATE .......;
INSERT.......;
SELECT myTable.field2 from myTable'
LANGUAGE 'sql';

I always get an error saying that there is a type mismatch between what is
behing the "setof" and what is return by this function (myTable.field2)


Any idea?

(Note: I am using postgresql 7.02)

Fabien




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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Backend-internal SPI operations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Backend-internal SPI operations