]> granicus.if.org Git - postgresql/commit
Allow multiple hostaddrs to go with multiple hostnames.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 10 Jul 2017 09:28:57 +0000 (12:28 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 10 Jul 2017 09:28:57 +0000 (12:28 +0300)
commit7b02ba62e9ffad5b14c24756a0c2aeae839c9d05
treeb3b5261ccb7b39b335826b73d52b0b10293c9af7
parent260ba8525a6365cfb3251d619767cc6ae19ddff8
Allow multiple hostaddrs to go with multiple hostnames.

Also fix two other issues, while we're at it:

* In error message on connection failure, if multiple network addresses
were given as the host option, as in "host=127.0.0.1,127.0.0.2", the
error message printed the address twice.

* If there were many more ports than hostnames, the error message would
always claim that there was one port too many, even if there was more than
one. For example, if you gave 2 hostnames and 5 ports, the error message
claimed that you gave 2 hostnames and 3 ports.

Discussion: https://www.postgresql.org/message-id/10badbc6-4d5a-a769-623a-f7ada43e14dd@iki.fi
doc/src/sgml/libpq.sgml
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/libpq-int.h