Re: [PATCH] PGSERVICEFILE as part of a normal connection string
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Ryo Kanbayashi <kanbayashi.dev@gmail.com>
Cc: Torsten Förtsch <tfoertsch123@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-03-27T09:31:14Z
Lists: pgsql-hackers
On Sun, Mar 23, 2025 at 12:32:03PM +0900, Ryo Kanbayashi wrote: > Additional test scripts have been merged to a single script ^^ b I have spent quite a bit of time on the review 0001 with the new tests to get something in for this release, and there was quite a bit going on there: - The script should set PGSYSCONFDIR, or it could grab data that depend on the host. This can use the temporary folder created in the test. - On the same ground, we need a similar tweak for PGSERVICEFILE or we would go into pqGetHomeDirectory() and look at a HOME folder (WIN32 and non-WIN32). With that addressed, there could be much more tests, like for cases where PGSERVICEFILE is set but points to a file that does not exist, more combinations between URIs, connection parameters and PGSERVICE, for success and failure cases, empty service file, etc. Another thing that I've noticed to be useful to cover is the case based on the hardcoded service file name pg_service.conf in PGSYSCONFDIR, which is used as a fallback in the code if the service name cannot be found in the initial PGSERVICEFILE, acting as a fallback option. As long as PGSYSCONFDIR is set, we could test one in isolation using the temporary folder created by the test. With all that in mind and more documentation added to the test, I've applied 0001, so let's see what the buildfarm has to say. The CI was stable, so it's a start. I am not sure that I'll have the time to look at 0002 for this release cycle, could it be possible to get a rebase for it? -- Michael
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
psql: Add variable SERVICEFILE
- 6b1c4d326b06 19 (unreleased) landed
-
libpq: Add "servicefile" connection option
- 092f3c63efc6 19 (unreleased) landed
-
libpq: Add TAP test for nested service file
- df286a5b830a 19 (unreleased) landed
-
libpq: Fix some issues in TAP tests for service files
- 2c7bd2ba507e 18.0 landed
-
docs: Fix column count attribute in table
- ea3f9b6da34a 18.0 cited
-
libpq: Add TAP tests for service files and names
- 72c2f36d5727 18.0 landed