Re: Type identification with libpq / PQFmod() when using aggregates (SUM)

From: Sebastien FLAESCH <sf(at)4js(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Type identification with libpq / PQFmod() when using aggregates (SUM)
Date: 2014-04-14 14:24:19
Message-ID: 534BEF93.40307@4js.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On 04/14/2014 04:01 PM, Tom Lane wrote:
> Sebastien FLAESCH <sf(at)4js(dot)com> 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Karthik Segpi 2014-04-25 15:10:43 JDBC API to send SimpleQuery ('Q')?
Previous Message Tom Lane 2014-04-14 14:01:00 Re: Type identification with libpq / PQFmod() when using aggregates (SUM)