Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WZho9-0004cF-Of for pgsql-interfaces@arkaria.postgresql.org; Mon, 14 Apr 2014 14:24:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WZho8-0000ml-VK for pgsql-interfaces@arkaria.postgresql.org; Mon, 14 Apr 2014 14:24:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WZho7-0000k4-Ca for pgsql-interfaces@postgresql.org; Mon, 14 Apr 2014 14:24:23 +0000 Received: from mail231.strasbourg.4js.com ([92.103.31.231]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WZho4-0001zv-Na for pgsql-interfaces@postgresql.org; Mon, 14 Apr 2014 14:24:22 +0000 Received: from [10.0.40.29] (orion.strasbourg.4js.com [10.0.40.29]) (authenticated bits=0) by mail231.strasbourg.4js.com (8.14.4/8.14.4/Debian-4) with ESMTP id s3EEOJpP016336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 14 Apr 2014 16:24:19 +0200 Message-ID: <534BEF93.40307@4js.com> Date: Mon, 14 Apr 2014 16:24:19 +0200 From: Sebastien FLAESCH Organization: Four Js Development Tools User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.3.0 MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: Type identification with libpq / PQFmod() when using aggregates (SUM) References: <534BB32F.4020503@4js.com> <12496.1397484060@sss.pgh.pa.us> In-Reply-To: <12496.1397484060@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.8 at mail231 X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail231.strasbourg.4js.com [10.10.0.1]); Mon, 14 Apr 2014 16:24:19 +0200 (CEST) X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org On 04/14/2014 04:01 PM, Tom Lane wrote: > Sebastien FLAESCH writes: >> But when using an aggregate function like SUM(), PQfmode() function returns >> "no information available" (-1) ... > >> Is the type of the result of an aggregate function (or even more complex >> expressions) not known by the server? > > That's correct. Thank you Tom, but then, IMHO, it should be considered as a request... Some client applications (which do a bit more than just displaying the result string of query columns) need that information, for ex to do data conversions, automatic formatting, etc. Seb -- Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces