| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Cesar A(dot) K(dot) Grossmann" <cesar(at)rotnet(dot)com(dot)br> |
| Cc: | PostgreSQL-General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: CREATE FUNCTION problem |
| Date: | 2000-11-02 21:15:00 |
| Message-ID: | 26892.973199700@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Cesar A. K. Grossmann" <cesar(at)rotnet(dot)com(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | KuroiNeko | 2000-11-02 21:34:07 | Re: Does this table exist? |
| Previous Message | Warren Vanichuk | 2000-11-02 21:09:07 | Re: Does this table exist? |