On Tue, Jun 10, 2025 at 4:30 PM Michael Paquier <mich...@paquier.xyz> wrote: > > On Mon, Jun 09, 2025 at 10:25:26PM +0900, Ryo Kanbayashi wrote: > >> This could be a patch built on top of the introduction of the core API > >> for the service file. > > > > :) > > >> - Perhaps a shortcut for PROMPT? > > > > I will kindly take a rain check on this one :) > > I am not sure to understand what you mean here, but let's discard this > idea as it is also possible to use %:name: in a psql's prompt with the > new variable you are introducing.
OK ^^; > + Defaults to <filename>~/.pg_service.conf</filename>, or > + <filename>%APPDATA%\postgresql\.pg_service.conf</filename> on > + Microsoft Windows. > > I don't think that this sentence is true. The parameter does not > default to these values. The connection logic would fall back to > these files if the parameter is not defined, and the parameter knows > nothing about them. OK. I removed the sentence. > --- a/src/interfaces/libpq/exports.txt > +++ b/src/interfaces/libpq/exports.txt > @@ -206,8 +206,9 @@ PQsocketPoll 203 > PQsetChunkedRowsMode 204 > PQgetCurrentTimeUSec 205 > PQservice 206 > -PQsetAuthDataHook 207 > -PQgetAuthDataHook 208 > -PQdefaultAuthDataHook 209 > -PQfullProtocolVersion 210 > -appendPQExpBufferVA 211 > +PQserviceFile 207 > +PQsetAuthDataHook 208 > +PQgetAuthDataHook 209 > +PQdefaultAuthDataHook 210 > +PQfullProtocolVersion 211 > +appendPQExpBufferVA 212 > > The new one goes to the bottom AFAIK. OK. > The patch can be split into multiple pieces: > - Core libpq changes with API and tests. > - psql changes. OK. I splited our patch to above 2 pieces. > +# "service" param included service file (invalid) > +# including contents of pg_service_valid.conf and a nested service option > > "Service file with service defined (invalid)." > > +# "servicefile" param included service file (invalid) > +# including contents of pg_service_valid.conf and a nested servicefile option > > "Service file with servicefile defined (invalid)." OK Thanks for review :) --- Great Regards, Ryo Kanbayashi
v10-0001-servicefile-option-usage-on-connection-string-fe.patch
Description: Binary data
v10-0002-psql-enhancement-related-servicefile-option-on-c.patch
Description: Binary data