Re: [PATCH] PGSERVICEFILE as part of a normal connection string

Поиск
Список
Период
Сортировка
От Ryo Kanbayashi
Тема Re: [PATCH] PGSERVICEFILE as part of a normal connection string
Дата
Msg-id CANOn0EwwybL01YuPgoU32nBS9rgeEpxY+EGsRDNQ1Q410-XK1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] PGSERVICEFILE as part of a normal connection string  (Andrew Jackson <andrewjackson947@gmail.com>)
Ответы Re: [PATCH] PGSERVICEFILE as part of a normal connection string
Список pgsql-hackers
On Tue, Apr 1, 2025 at 6:26 AM Andrew Jackson
<andrewjackson947@gmail.com> wrote:
>
> Hi,
>
> I am working on a feature adjacent to the connection service functionality and noticed some issues with the tests
introducedin this thread. Basically they incorrectly invoke the append perl function by passing multiple strings to
appendwhen the function only takes one string to append. This caused the generated service files to not actually
containany connection parameters. The tests were only passing because the connect_ok perl function set the connection
parametersas environment variables which covered up the misformed connection service file. 
> The attached patch is much more strict in that it creates a dummy database that is not started and passes all queries
thoughthat and tests that the connection service file correctly overrides the environment variables set by the dummy
databases'query functions 

Andrew,
CC: Michael, Torsten

Thank you to find issues the tests.

I confirmed points you noticed and validity of your proposed
modifications with local execution and internal impl of connect_ok
func.

- Current usage of append_to_file func is wrong and not appropriate
service file is generated
- connect_ok perl func set the connection parameters as environment
variables which covered up the misformed connection service file
  -
https://github.com/postgres/postgres/blob/ea3f9b6da34a1a4dc2c0c118789587c2a85c78d7/src/test/perl/PostgreSQL/Test/Cluster.pm#L2576
  -
https://github.com/postgres/postgres/blob/ea3f9b6da34a1a4dc2c0c118789587c2a85c78d7/src/test/perl/PostgreSQL/Test/Cluster.pm#L2120
  -
https://github.com/postgres/postgres/blob/ea3f9b6da34a1a4dc2c0c118789587c2a85c78d7/src/test/perl/PostgreSQL/Test/Cluster.pm#L1718
- Your dummy node object introduced code works without problem and the
code is more strict than current code

I'll reflect your notice and suggestion to the patch current I'm working on :)

---
Great Regards,
Ryo Kanbayashi



В списке pgsql-hackers по дате отправления: