From: Kumar <sgnerd@yahoo.com.sg>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: psql <pgsql-sql@postgresql.org>
Subject: Re: Fetching a single column from a record returning function
Date: Wed, 21 Jan 2004 11:59:02 +0530
Message-ID: <002e01c3dfec$200d6310$7502a8c0@hdsc.com> (raw)
References: <005101c3df24$2662ed20$7502a8c0@hdsc.com>
<24270.1074614284@sss.pgh.pa.us>
Yes it worked. Thanks
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Kumar" <sgnerd@yahoo.com.sg>
Cc: "psql" <pgsql-sql@postgresql.org>
Sent: Tuesday, January 20, 2004 9:28 PM
Subject: Re: [SQL] Fetching a single column from a record returning function
> "Kumar" <sgnerd@yahoo.com.sg> writes:
> > select * from fn_email(1)
> > as (email_folder_id int4,email_folder_name varchar,descrip
varchar,msgcount
> > int8,unreadcount int8,size int8);
>
> > Is it possible to fetch only one column (the 'msgcount') from the
function.=
> > Because I am interested in SUM(msgcount). Please shed some light.
>
> select sum(msgcount) from fn_email(1)
> as (email_folder_id int4,email_folder_name varchar,descrip
varchar,msgcount
> int8,unreadcount int8,size int8);
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
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: sgnerd@yahoo.com.sg, tgl@sss.pgh.pa.us
Subject: Re: Fetching a single column from a record returning function
In-Reply-To: <002e01c3dfec$200d6310$7502a8c0@hdsc.com>
* 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