Create Function (SQL)

From: Mark Simon <mark(at)manngo(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Create Function (SQL)
Date: 2006-11-05 06:21:00
Message-ID: 454D82CC.6090503@manngo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 the table (whatever) as out
parameters, or as a return type, or can I have a generic table returned
from this?

Thanks,

Mark
--

Mark Simon

Manngo Net Pty Ltd

Phone/Fax: 1300 726 000
mobile: 0411 246 672

email: mark(at)manngo(dot)net <mailto:mark(at)comparity(dot)net>
web: http://www.manngo.net

Resume: http://mark.manngo.net

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2006-11-05 07:38:56 Re: Create View
Previous Message Mark Simon 2006-11-05 06:17:15 Create View