pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Kumar <sgnerd@yahoo.com.sg>
Cc: psql <pgsql-sql@postgresql.org>
Subject: Re: Fetching a single column from a record returning function
Date: Tue, 20 Jan 2004 08:13:17 -0800
Message-ID: <400D539D.9090102@joeconway.com> (raw)
In-Reply-To: <005101c3df24$2662ed20$7502a8c0@hdsc.com>
References: <005101c3df24$2662ed20$7502a8c0@hdsc.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <400D539D.9090102@joeconway.com>
Permalink:  ../400D539D.9090102@joeconway.com/
Also on:    postgresql.org/message-id/400D539D.9090102@joeconway.com

 · 

reply

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: mail@joeconway.com, sgnerd@yahoo.com.sg
  Subject: Re: Fetching a single column from a record returning function
  In-Reply-To: <400D539D.9090102@joeconway.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