| От | Tom Lane |
|---|---|
| Тема | Re: CREATE FUNCTION problem |
| Дата | |
| Msg-id | 26892.973199700@sss.pgh.pa.us обсуждение |
| Ответ на | CREATE FUNCTION problem ("Cesar A. K. Grossmann" <cesar@rotnet.com.br>) |
| Список | pgsql-general |
"Cesar A. K. Grossmann" <cesar@rotnet.com.br> writes:
> create function
> vinculoExportacao (varchar)
> returns setof
> as 'select codigo, nome, ''T'' as selected
> from cad_exportacao
> ...
> psql:tmp/teste2.sql:15: ERROR: parser: parse error at or near "as"
setof *what* ? The parser is expecting SETOF typename. In this case
you are going to need a tuple type that corresponds to the row structure
you want to return a set of.
BTW, please see my post from a week or two back that describes the known
problems with functions returning tuples and sets ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера