libpq example doesn't work
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t38951psql -h localhost -U postgresBuilt from patchset v1 (message #1), July 27, 2026 at 08:15 PM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t38951_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t38951_1 && git checkout t38951_1Patchset v1 (message #1) is on t38951_1
Hi,
When I tried to use libpq, I found that libpq example[1]https://www.postgresql.org/docs/devel/static/libpq-example.html does not work.
That's because SELECT pg_catlog.set_config() never returns PGRES_COMMAND_OK which is expected,
but actually returns PGRES_TUPLES_OK.
Patch attached.
I changed both src/test/example and document.
[1]: https://www.postgresql.org/docs/devel/static/libpq-example.html
(By the way, I'm wondering why these examples are placed under src/test.
They are just examples and not regression tests.)
Best regards,
Takeshi Ideriha
On 27.06.18 08:29, Ideriha, Takeshi wrote:
When I tried to use libpq, I found that libpq example[1] does not work.
That's because SELECT pg_catlog.set_config() never returns PGRES_COMMAND_OK which is expected,
but actually returns PGRES_TUPLES_OK.
Fixed. There were additional similar cases that I fixed also.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
-----Original Message-----
From: Peter Eisentraut [mailto:peter.eisentraut@2ndquadrant.com]
Sent: Sunday, July 1, 2018 9:17 PM
To: Ideriha, Takeshi/出利葉 健 <ideriha.takeshi@jp.fujitsu.com>; pgsql-hackers
<pgsql-hackers@postgresql.org>
Subject: Re: libpq example doesn't workOn 27.06.18 08:29, Ideriha, Takeshi wrote:
When I tried to use libpq, I found that libpq example[1] does not work.
That's because SELECT pg_catlog.set_config() never returns
PGRES_COMMAND_OK which is expected, but actually returns PGRES_TUPLES_OK.Fixed. There were additional similar cases that I fixed also.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Thank you for the commit. I totally missed the large object examples.
Regards,
Takeshi Ideriha