pgsql: libpq: Add "servicefile" connection option

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: libpq: Add "servicefile" connection option
Дата
Msg-id E1uarWg-0063jR-25@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
libpq: Add "servicefile" connection option

This commit adds the possibility to specify a service file in a
connection string, using a new option called "servicefile".  The parsing
of the service file happens so as things are done in this order of
priority:
- The servicefile connection option.
- Environment variable PGSERVICEFILE.
- Default path, depending on the HOME environment.

Note that in the last default case, we need to fill in "servicefile" for
the connection's PQconninfoOption to let clients know which service file
has been used for the connection.  Some TAP tests are added, with a few
tweaks required for Windows when using URIs or connection option values,
for the location paths.

Author: Torsten Förtsch <tfoertsch123@gmail.com>
Co-authored-by: Ryo Kanbayashi <kanbayashi.dev@gmail.com>
Discussion: https://postgr.es/m/CAKkG4_nCjx3a_F3gyXHSPWxD8Sd8URaM89wey7fG_9g7KBkOCQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/092f3c63efc6a6ce235cfbed45bd05b739de8540

Modified Files
--------------
doc/src/sgml/libpq.sgml               | 24 +++++++----
src/interfaces/libpq/fe-connect.c     | 54 ++++++++++++++++++++++--
src/interfaces/libpq/libpq-int.h      |  2 +
src/interfaces/libpq/t/006_service.pl | 79 ++++++++++++++++++++++++++++++++++-
4 files changed, 146 insertions(+), 13 deletions(-)


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