| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: SETOF Record Problem |
| Date: | 2010-01-19 07:19:04 |
| Message-ID: | 20100119071904.GE29338@a-kretschmer.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
In response to Yan Cheng Cheok :
> By referring to http://www.postgresql.org/docs/current/static/xfunc-sql.html#XFUNC-SQL-TABLE-FUNCTIONS, section 34.4.8. SQL Functions Returning TABLE
That's for language SQL, you are using:
> CREATE OR REPLACE FUNCTION get_measurements(IN bigint)
> LANGUAGE 'plpgsql' VOLATILE
language plpgsql. That's not the same ...
> But the example doesn't use any "INTO" or "RETURN".
Sure? Read again:
http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html
Rewrite your to RETURN <insert your select here>;
Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99
| From | Date | Subject | |
|---|---|---|---|
| Next Message | A. Kretschmer | 2010-01-19 07:26:10 | Re: Index on immutable function call |
| Previous Message | Ivan Sergio Borgonovo | 2010-01-19 07:18:46 | C: extending text search: from where to start |