Re: [SQL] Function to return a multiple colmn table or view

2007-04-24 Thread Richard Huxton
Don't forget to cc: the list Wilkinson, Jim wrote: Hi Richard, your example worked find , but when I substitue my view into the function and the tale name, I get the following error: ERROR: wrong record type supplied in RETURN NEXT CONTEXT: Pl/pqSQL function "create_view" line 11 at return next

Re: [SQL] Function to return a multiple colmn table or view

2007-04-20 Thread Richard Huxton
Wilkinson, Jim wrote: 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 !!! C

[SQL] Function to return a multiple colmn table or view

2007-04-20 Thread Wilkinson, Jim
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(