X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1ED6DD1D437 for ; Tue, 20 Jan 2004 16:15:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 59462-07 for ; Tue, 20 Jan 2004 12:14:50 -0400 (AST) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 4D3FAD1E7F1 for ; Tue, 20 Jan 2004 12:14:49 -0400 (AST) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 779323; Tue, 20 Jan 2004 08:11:52 -0800 Message-ID: <400D539D.9090102@joeconway.com> Date: Tue, 20 Jan 2004 08:13:17 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kumar Cc: psql Subject: Re: Fetching a single column from a record returning function References: <005101c3df24$2662ed20$7502a8c0@hdsc.com> In-Reply-To: <005101c3df24$2662ed20$7502a8c0@hdsc.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/187 X-Sequence-Number: 16580 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