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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general