Re: real/float example for testlibpq3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: real/float example for testlibpq3
Date
Msg-id 2511609.1646061540@sss.pgh.pa.us
Whole thread Raw
In response to Re: real/float example for testlibpq3  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: real/float example for testlibpq3  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> I am wondering whether we should provide PQgetfloatvalue() which does
> what that example shows but transparently. It will return a float
> value of the given field instead of char *.

I'm against that, precisely because ...

> That will standardize the
> way to fetch real typed values in libpq. That leads to the next
> question. Do we need to introduce different PQget*value() for standard
> C/SQL data types.

... I do not want to go here.  Where would you stop?  How would you
deal with cross-machine inconsistencies in integer widths?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql: Make SSL info display more compact
Next
From: Bharath Rupireddy
Date:
Subject: Use "WAL segment" instead of "log segment" consistently in user-facing messages