pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wilkinson, Jim <Jim.Wilkinson@cra-arc.gc.ca>
To: pgsql-sql@postgresql.org
Subject: Function to return a multiple colmn table or view
Date: Fri, 20 Apr 2007 10:13:20 -0400
Message-ID: <7CCC5BEF5E72394C963E529B54EB4A642A19F1@SD01ITMV12.PROD.NET> (raw)

I am new to psql , so please be patient !

Can someone please provide a small quick example of a a function that
take 1 paramater and based on that parameter, returns a table or view ?

Etc ....  Note this is just a abstract of the functon, not a working
function call !!!

Create function viewtest( start_month) 

	If $1 = 'April'
	Then 
	Select * from april_view;
	Return ;

Let me know  how to do this.

Thanks

view thread (3+ messages)  latest in thread

Message-ID: <7CCC5BEF5E72394C963E529B54EB4A642A19F1@SD01ITMV12.PROD.NET>
Permalink:  ../7CCC5BEF5E72394C963E529B54EB4A642A19F1@SD01ITMV12.PROD.NET/
Also on:    postgresql.org/message-id/7CCC5BEF5E72394C963E529B54EB4A642A19F1@SD01ITMV12.PROD.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: Jim.Wilkinson@cra-arc.gc.ca
  Subject: Re: Function to return a multiple colmn table or view
  In-Reply-To: <7CCC5BEF5E72394C963E529B54EB4A642A19F1@SD01ITMV12.PROD.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