inquiry using create function

From: fcarlo(at)ntsp(dot)nec(dot)co(dot)jp
To: pgsql-hackers(at)postgresql(dot)org
Subject: inquiry using create function
Date: 2001-10-25 20:47:28
Message-ID: 3BD87A60.E9627E72@ntsp.nec.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello,

This is my first post here.
I've tried to search the archive and i haven't found
an answer to my problem...here it is...

I created a function with the "create function+setof" keywords...

create function employee(int) returns setof employee as 'select * from
employee where $1 = id'
language 'sql';

Instead of returning a tuple, I get this:

?column?
-----------
136491256

I tried exchanging "$1" and "id" but the thing did not yet work. I
replaced the "*" with the actual fields in my table and it still would
not work.

What could be the problem? By the way, I use postgreseql 7.1.3

Thanks!

Carlo Florendo

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikhail Terekhov 2001-10-25 21:02:23 LOCK SEQUENCE
Previous Message Bruce Momjian 2001-10-25 20:00:53 HISTORY updated