Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Joining with re...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 3456 of 3596
Post > Topic >>

Joining with result of a plpgsql function

by matthew@[EMAIL PROTECTED] ("Matthew T. O'Connor") May 7, 2008 at 11:28 PM

Hello,

I have a pl/pgsql function, defined as:

CREATE FUNCTION tms.get_tms_summary(id integer)
   RETURNS tms.tms_summary

get_tms_summary returns a composite type, tms_summary, which is 
comprised of several numerics.

What I would like to do is something like:

select f.id, f.name, tms.get_tms_summary(f.id) from foo f;

However this returns only three columns, the third of which is the 
entire complex data type in one column.

I can do: select * from tms.get_tms_summary(99);

But I would really like to be able to combine it with other data and get 
a result set that looked like:

f.id, f.name, tms_summary.col1, tms_summary.col2 ...


Any thoughts or suggestions?


Thank you,

Matthew O'Connor


-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 3 Posts in Topic:
Joining with result of a plpgsql function
matthew@[EMAIL PROTECTED]  2008-05-07 23:28:10 
Re: Joining with result of a plpgsql function
sszabo@[EMAIL PROTECTED]   2008-05-07 21:07:19 
Re: Joining with result of a plpgsql function
matthew@[EMAIL PROTECTED]  2008-05-08 01:21:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 5:07:38 CDT 2008.