Re: Fetching a single column from a record returning function

From: Joe Conway <mail(at)joeconway(dot)com>
To: Kumar <sgnerd(at)yahoo(dot)com(dot)sg>
Cc: psql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Fetching a single column from a record returning function
Date: 2004-01-20 16:13:17
Message-ID: 400D539D.9090102@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kumar wrote:
> 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.

What's wrong with:

select msgcount from fn_email(1)
as (email_folder_id int4,email_folder_name varchar,descrip
varchar,msgcount int8,unreadcount int8,size int8);

?

Try showing us more detail about what you want to do and why it isn't
currently working.

Joe

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kumar 2004-01-21 06:29:02 Re: Fetching a single column from a record returning function
Previous Message Christopher Browne 2004-01-20 16:06:51 Re: comparing nulls