Function to return a multiple colmn table or view

From: "Wilkinson, Jim" <Jim(dot)Wilkinson(at)cra-arc(dot)gc(dot)ca>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Function to return a multiple colmn table or view
Date: 2007-04-20 14:13:20
Message-ID: 7CCC5BEF5E72394C963E529B54EB4A642A19F1@SD01ITMV12.PROD.NET
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2007-04-20 14:32:28 Re: Function to return a multiple colmn table or view
Previous Message Joe 2007-04-20 13:21:11 Re: We all are looped on Internet: request + transport = invariant