Re: Fetching a single column from a record returning function

From: "Kumar" <sgnerd(at)yahoo(dot)com(dot)sg>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "psql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Fetching a single column from a record returning function
Date: 2004-01-21 06:29:02
Message-ID: 002e01c3dfec$200d6310$7502a8c0@hdsc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Yes it worked. Thanks

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kumar" <sgnerd(at)yahoo(dot)com(dot)sg>
Cc: "psql" <pgsql-sql(at)postgresql(dot)org>
Sent: Tuesday, January 20, 2004 9:28 PM
Subject: Re: [SQL] Fetching a single column from a record returning function

> "Kumar" <sgnerd(at)yahoo(dot)com(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Terence Kearns 2004-01-21 08:09:20 cygwin warnings in the log file
Previous Message Joe Conway 2004-01-20 16:13:17 Re: Fetching a single column from a record returning function