Re: [SQL] Create Function (SQL)

2006-11-05 Thread imad
You can return a record: create function thing(text) returns record as 'select * from whatever where id=$1' language sql; Hope this helps. --Imad www.EnterpriseDB.com On 11/5/06, Mark Simon <[EMAIL PROTECTED]> wrote: I am trying to create a simple function using SQL rather than PGSQL. At

[SQL] Create Function (SQL)

2006-11-04 Thread Mark Simon
I am trying to create a simple function using SQL rather than PGSQL. At this point, it's just for the exercise. Is it possible to create a function similar to the following:     create function thing(text) as select * from whatever where id=$1; Do I need to specify all of the columns from th