Re: real/float example for testlibpq3

Поиск
Список
Период
Сортировка
Искать
От
Ashutosh Bapat
Тема
Re: real/float example for testlibpq3
Дата
Msg-id
CAExHW5tm1FyoLZXdTjdrfRO7ObuoL_p2krc65C5s8D3eWFB50g@mail.gmail.com
Ответ на
Список
Дерево обсуждения
real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: real/float example for testlibpq3 Tom Lane <tgl@sss.pgh.pa.us>
Re: real/float example for testlibpq3 Chapman Flack <chap@anastigmatix.net>
Re: real/float example for testlibpq3 Tom Lane <tgl@sss.pgh.pa.us>
Re: real/float example for testlibpq3 Greg Stark <stark@mit.edu>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Robert Haas <robertmhaas@gmail.com>
Re: real/float example for testlibpq3 Tom Lane <tgl@sss.pgh.pa.us>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: real/float example for testlibpq3 Tom Lane <tgl@sss.pgh.pa.us>
Re: real/float example for testlibpq3 Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: real/float example for testlibpq3 Tom Lane <tgl@sss.pgh.pa.us>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Michael Paquier <michael@paquier.xyz>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Tom Lane <tgl@sss.pgh.pa.us>
Re: real/float example for testlibpq3 Robert Haas <robertmhaas@gmail.com>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
Re: real/float example for testlibpq3 Mark Wong <markwkm@gmail.com>
Re: real/float example for testlibpq3 Daniel Gustafsson <daniel@yesql.se>
Hi Mark,
Fetching a "real" type field from libpq doesn't look that intuitive.
So this example is super helpful. Thanks.

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 *. 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.

-- 
Best Wishes,
Ashutosh Bapat

On Fri, Feb 25, 2022 at 3:12 AM Mark Wong  wrote:
>
> Hi everyone,
>
> Would adding additional examples to testlibpq3.c on handling more data
> types be helpful?  I've attached a patch adding how to handle a REAL to
> current example.
>
> Regards,
> Mark


В списке pgsql-hackers по дате отправления
От: Matthias van de Meent
Дата:
FAQ