<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/interfaces/libpq/test/Makefile, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>Add Windows file version information to libpq/test programs.</title>
<updated>2022-07-03T20:07:17+00:00</updated>
<author>
<name>Noah Misch</name>
<email>noah@leadboat.com</email>
</author>
<published>2022-07-03T20:07:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=b6a5158f98fd5158f66943d721061418f183b370'/>
<id>b6a5158f98fd5158f66943d721061418f183b370</id>
<content type='text'>
Back-patch to v15, the first version to install these programs.

Discussion: https://postgr.es/m/20220501080706.GA1542365@rfd.leadboat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Back-patch to v15, the first version to install these programs.

Discussion: https://postgr.es/m/20220501080706.GA1542365@rfd.leadboat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename libpq test programs with libpq_ prefix</title>
<updated>2022-05-04T12:15:25+00:00</updated>
<author>
<name>Daniel Gustafsson</name>
<email>dgustafsson@postgresql.org</email>
</author>
<published>2022-05-04T12:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=0432490d290f679cad773ce4735e8769e2c4db75'/>
<id>0432490d290f679cad773ce4735e8769e2c4db75</id>
<content type='text'>
The testclient and uri-regress programs in the libpq test suite had
quite generic names which didn't convey much meaning. Since they are
installed as part of the MSVC test runs, ensure that their purpose
is a little bit clearer by renaming with a libpq_ prefix. While at
it rename uri-regress to uri_regress to avoid mixing dash and under-
score in the same filename.

Reported-by: Noah Misch &lt;noah@leadboat.com&gt;
Discussion: https://postgr.es/m/20220501080706.GA1542365@rfd.leadboat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The testclient and uri-regress programs in the libpq test suite had
quite generic names which didn't convey much meaning. Since they are
installed as part of the MSVC test runs, ensure that their purpose
is a little bit clearer by renaming with a libpq_ prefix. While at
it rename uri-regress to uri_regress to avoid mixing dash and under-
score in the same filename.

Reported-by: Noah Misch &lt;noah@leadboat.com&gt;
Discussion: https://postgr.es/m/20220501080706.GA1542365@rfd.leadboat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable SSL library detection via PQsslAttribute()</title>
<updated>2022-03-29T12:02:45+00:00</updated>
<author>
<name>Daniel Gustafsson</name>
<email>dgustafsson@postgresql.org</email>
</author>
<published>2022-03-29T12:02:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=ebc8b7d4416d8e0dfb7c05132ef6182fd3daf885'/>
<id>ebc8b7d4416d8e0dfb7c05132ef6182fd3daf885</id>
<content type='text'>
Currently, libpq client code must have a connection handle
before it can query the "library" SSL attribute.  This poses
problems if the client needs to know what SSL library is in
use before constructing a connection string.

Allow PQsslAttribute(NULL, "library") to return the library
in use -- currently, just "OpenSSL" or NULL. The new behavior
is announced with the LIBPQ_HAS_SSL_LIBRARY_DETECTION feature
macro, allowing clients to differentiate between a libpq that
was compiled without SSL support and a libpq that's just too
old to tell.

Author: Jacob Champion &lt;pchampion@vmware.com&gt;
Reviewed-by: Robert Haas &lt;robertmhaas@gmail.com&gt;
Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Discussion: https://postgr.es/m/4c8b76ef434a96627170a31c3acd33cbfd6e41f1.camel@vmware.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, libpq client code must have a connection handle
before it can query the "library" SSL attribute.  This poses
problems if the client needs to know what SSL library is in
use before constructing a connection string.

Allow PQsslAttribute(NULL, "library") to return the library
in use -- currently, just "OpenSSL" or NULL. The new behavior
is announced with the LIBPQ_HAS_SSL_LIBRARY_DETECTION feature
macro, allowing clients to differentiate between a libpq that
was compiled without SSL support and a libpq that's just too
old to tell.

Author: Jacob Champion &lt;pchampion@vmware.com&gt;
Reviewed-by: Robert Haas &lt;robertmhaas@gmail.com&gt;
Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Discussion: https://postgr.es/m/4c8b76ef434a96627170a31c3acd33cbfd6e41f1.camel@vmware.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert src/interfaces/libpq/test to a tap test.</title>
<updated>2022-02-27T00:51:47+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2022-02-27T00:51:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=ac25173cdbc40b310a7e72d9557c45a699f1f7b3'/>
<id>ac25173cdbc40b310a7e72d9557c45a699f1f7b3</id>
<content type='text'>
The old form of the test needed a bunch of custom infrastructure. These days
tap tests provide the necessary infrastructure to do better.

We discussed whether to move this test to src/test/modules, alongside
libpq_pipeline, but concluded that the opposite direction would be
better. libpq_pipeline will be moved at a later date, once the buildfarm and
msvc build infrastructure is ready for it.

The invocation of the tap test will be added in the next commit. It involves
just enough buildsystem changes to be worth commiting separately. Can't happen
the other way round because prove errors out when invoked without tests.

Discussion: https://postgr.es/m/20220223203031.ezrd73ohvjgfksow@alap3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old form of the test needed a bunch of custom infrastructure. These days
tap tests provide the necessary infrastructure to do better.

We discussed whether to move this test to src/test/modules, alongside
libpq_pipeline, but concluded that the opposite direction would be
better. libpq_pipeline will be moved at a later date, once the buildfarm and
msvc build infrastructure is ready for it.

The invocation of the tap test will be added in the next commit. It involves
just enough buildsystem changes to be worth commiting separately. Can't happen
the other way round because prove errors out when invoked without tests.

Discussion: https://postgr.es/m/20220223203031.ezrd73ohvjgfksow@alap3.anarazel.de
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent accidental linking of system-supplied copies of libpq.so etc.</title>
<updated>2018-04-03T20:26:05+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2018-04-03T20:26:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=dddfc4cb2edcfa5497f5d50190a7fb046c51da16'/>
<id>dddfc4cb2edcfa5497f5d50190a7fb046c51da16</id>
<content type='text'>
We were being careless in some places about the order of -L switches in
link command lines, such that -L switches referring to external directories
could come before those referring to directories within the build tree.
This made it possible to accidentally link a system-supplied library, for
example /usr/lib/libpq.so, in place of the one built in the build tree.
Hilarity ensued, the more so the older the system-supplied library is.

To fix, break LDFLAGS into two parts, a sub-variable LDFLAGS_INTERNAL
and the main LDFLAGS variable, both of which are "recursively expanded"
so that they can be incrementally adjusted by different makefiles.
Establish a policy that -L switches for directories in the build tree
must always be added to LDFLAGS_INTERNAL, while -L switches for external
directories must always be added to LDFLAGS.  This is sufficient to
ensure a safe search order.  For simplicity, we typically also put -l
switches for the respective libraries into those same variables.
(Traditional make usage would have us put -l switches into LIBS, but
cleaning that up is a project for another day, as there's no clear
need for it.)

This turns out to also require separating SHLIB_LINK into two variables,
SHLIB_LINK and SHLIB_LINK_INTERNAL, with a similar rule about which
switches go into which variable.  And likewise for PG_LIBS.

Although this change might appear to affect external users of pgxs.mk,
I think it doesn't; they shouldn't have any need to touch the _INTERNAL
variables.

In passing, tweak src/common/Makefile so that the value of CPPFLAGS
recorded in pg_config lacks "-DFRONTEND" and the recorded value of
LDFLAGS lacks "-L../../../src/common".  Both of those things are
mistakes, apparently introduced during prior code rearrangements,
as old versions of pg_config don't print them.  In general we don't
want anything that's specific to the src/common subdirectory to
appear in those outputs.

This is certainly a bug fix, but in view of the lack of field
complaints, I'm unsure whether it's worth the risk of back-patching.
In any case it seems wise to see what the buildfarm makes of it first.

Discussion: https://postgr.es/m/25214.1522604295@sss.pgh.pa.us
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were being careless in some places about the order of -L switches in
link command lines, such that -L switches referring to external directories
could come before those referring to directories within the build tree.
This made it possible to accidentally link a system-supplied library, for
example /usr/lib/libpq.so, in place of the one built in the build tree.
Hilarity ensued, the more so the older the system-supplied library is.

To fix, break LDFLAGS into two parts, a sub-variable LDFLAGS_INTERNAL
and the main LDFLAGS variable, both of which are "recursively expanded"
so that they can be incrementally adjusted by different makefiles.
Establish a policy that -L switches for directories in the build tree
must always be added to LDFLAGS_INTERNAL, while -L switches for external
directories must always be added to LDFLAGS.  This is sufficient to
ensure a safe search order.  For simplicity, we typically also put -l
switches for the respective libraries into those same variables.
(Traditional make usage would have us put -l switches into LIBS, but
cleaning that up is a project for another day, as there's no clear
need for it.)

This turns out to also require separating SHLIB_LINK into two variables,
SHLIB_LINK and SHLIB_LINK_INTERNAL, with a similar rule about which
switches go into which variable.  And likewise for PG_LIBS.

Although this change might appear to affect external users of pgxs.mk,
I think it doesn't; they shouldn't have any need to touch the _INTERNAL
variables.

In passing, tweak src/common/Makefile so that the value of CPPFLAGS
recorded in pg_config lacks "-DFRONTEND" and the recorded value of
LDFLAGS lacks "-L../../../src/common".  Both of those things are
mistakes, apparently introduced during prior code rearrangements,
as old versions of pg_config don't print them.  In general we don't
want anything that's specific to the src/common subdirectory to
appear in those outputs.

This is certainly a bug fix, but in view of the lack of field
complaints, I'm unsure whether it's worth the risk of back-patching.
In any case it seems wise to see what the buildfarm makes of it first.

Discussion: https://postgr.es/m/25214.1522604295@sss.pgh.pa.us
</pre>
</div>
</content>
</entry>
<entry>
<title>Make src/interfaces/libpq/test clean up after itself.</title>
<updated>2017-02-19T22:18:10+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2017-02-19T22:18:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=090f21bbad98001979da8589e9647a1d49bce4ee'/>
<id>090f21bbad98001979da8589e9647a1d49bce4ee</id>
<content type='text'>
It failed to remove a .o file during "make clean", and it lacked
a .gitignore file entirely.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It failed to remove a .o file during "make clean", and it lacked
a .gitignore file entirely.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert libpq regress script to Perl</title>
<updated>2012-07-06T20:45:48+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2012-07-06T19:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=a184e4db83c80d28103774ced984c7790fbd44ba'/>
<id>a184e4db83c80d28103774ced984c7790fbd44ba</id>
<content type='text'>
This should ease its use on the Windows build environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should ease its use on the Windows build environment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Accept postgres:// URIs in libpq connection functions</title>
<updated>2012-04-11T07:33:51+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2012-04-11T06:59:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=b035cb9db7aa7c0f28581b23feb10d3c559701f6'/>
<id>b035cb9db7aa7c0f28581b23feb10d3c559701f6</id>
<content type='text'>
postgres:// URIs are an attempt to "stop the bleeding" in this general
area that has been said to occur due to external projects adopting their
own syntaxes.  The syntaxes supported by this patch:

 postgres://[user[:pwd]@][unix-socket][:port[/dbname]][?param1=value1&amp;...]
 postgres://[user[:pwd]@][net-location][:port][/dbname][?param1=value1&amp;...]

should be enough to cover most interesting cases without having to
resort to "param=value" pairs, but those are provided for the cases that
need them regardless.

libpq documentation has been shuffled around a bit, to avoid stuffing
all the format details into the PQconnectdbParams description, which was
already a bit overwhelming.  The list of keywords has moved to its own
subsection, and the details on the URI format live in another subsection.

This includes a simple test program, as requested in discussion, to
ensure that interesting corner cases continue to work appropriately in
the future.

Author: Alexander Shulgin
Some tweaking by Álvaro Herrera, Greg Smith, Daniel Farina, Peter Eisentraut
Reviewed by Robert Haas, Alexey Klyukin (offlist), Heikki Linnakangas,
Marko Kreen, and others

Oh, it also supports postgresql:// but that's probably just an accident.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
postgres:// URIs are an attempt to "stop the bleeding" in this general
area that has been said to occur due to external projects adopting their
own syntaxes.  The syntaxes supported by this patch:

 postgres://[user[:pwd]@][unix-socket][:port[/dbname]][?param1=value1&amp;...]
 postgres://[user[:pwd]@][net-location][:port][/dbname][?param1=value1&amp;...]

should be enough to cover most interesting cases without having to
resort to "param=value" pairs, but those are provided for the cases that
need them regardless.

libpq documentation has been shuffled around a bit, to avoid stuffing
all the format details into the PQconnectdbParams description, which was
already a bit overwhelming.  The list of keywords has moved to its own
subsection, and the details on the URI format live in another subsection.

This includes a simple test program, as requested in discussion, to
ensure that interesting corner cases continue to work appropriately in
the future.

Author: Alexander Shulgin
Some tweaking by Álvaro Herrera, Greg Smith, Daniel Farina, Peter Eisentraut
Reviewed by Robert Haas, Alexey Klyukin (offlist), Heikki Linnakangas,
Marko Kreen, and others

Oh, it also supports postgresql:// but that's probably just an accident.
</pre>
</div>
</content>
</entry>
</feed>
