SQL funtion - Mailing list pgsql-sql

From Najm Hashmi
Subject SQL funtion
Date
Msg-id 3A6092CA.1413C4E7@mondo-live.com
Whole thread Raw
List pgsql-sql
Hi All,I have written a very simply function as follows:
create function song_info(int4) returns setof songs as'  select songs.* from songs  where $1=song_id'  language 'sql';
when iIcall it  I get the following:    flipr=# select song_info(4);                            ?column?
              -----------                            136428992                               (1 row)
 

Is not it suppose to retrun me the tuple form songs table rather than
oid....
If  I want to get a complete tuple what can I do.
Thank you all for your help.
Regards, Najm.




pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: [PHP] Automatic increment
Next
From: Najm Hashmi
Date:
Subject: pl/pgsql Limits