pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Simon <mark@manngo.net>
To: pgsql-sql@postgresql.org
Subject: Create Function (SQL)
Date: Sun, 05 Nov 2006 17:21:00 +1100
Message-ID: <454D82CC.6090503@manngo.net> (raw)

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@manngo.net <mailto:mark@comparity.net>
web: http://www.manngo.net

Resume: http://mark.manngo.net

view thread (2+ messages)  latest in thread

Message-ID: <454D82CC.6090503@manngo.net>
Permalink:  ../454D82CC.6090503@manngo.net/
Also on:    postgresql.org/message-id/454D82CC.6090503@manngo.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mark@manngo.net
  Subject: Re: Create Function (SQL)
  In-Reply-To: <454D82CC.6090503@manngo.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox