PostgreSQL 9.2.25 (not released) commit log

Keep perl style checker happy

commit   : 4c1f42f588917225db16f3a6de62411a51bf3037    
  
author   : Andrew Dunstan <[email protected]>    
date     : Tue, 5 Feb 2019 15:16:55 -0500    
  
committer: Andrew Dunstan <[email protected]>    
date     : Tue, 5 Feb 2019 15:16:55 -0500    

Click here for diff

It doesn't like code before "use strict;".  
  
(cherry picked from commit ed2c2d063bd110f299211611b72a5dbe07a4d7be)  

M src/backend/catalog/genbki.pl

Fix searchpath for modern Perl for genbki.pl

commit   : 9a561fd55fd74ae5cd72a93599e4c72768d891cd    
  
author   : Andrew Dunstan <[email protected]>    
date     : Tue, 5 Feb 2019 09:59:46 -0500    
  
committer: Andrew Dunstan <[email protected]>    
date     : Tue, 5 Feb 2019 09:59:46 -0500    

Click here for diff

This was fixed for MSVC tools by commit 1df92eeafefac4, but per  
buildfarm member bowerbird genbki.pl needs the same treatment.  
  
Backpatch to all live branches.  
  
(cherry picked from commit 51884fa16a179852ec851172a72588d8e84ec05e)  

M src/backend/catalog/genbki.pl

Create common infrastructure for cross-version upgrade testing.

commit   : a2091843f69e426676e9f26a99190acd8215267d    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 16 Jan 2023 20:35:53 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 16 Jan 2023 20:35:53 -0500    

Click here for diff

To test pg_upgrade across major PG versions, we have to be able to  
modify or drop any old objects with no-longer-supported properties,  
and we have to be able to deal with cosmetic changes in pg_dump output.  
Up to now, the buildfarm and pg_upgrade's own test infrastructure had  
separate implementations of the former, and we had nothing but very  
ad-hoc rules for the latter (including an arbitrary threshold on how  
many lines of unchecked diff were okay!).  This patch creates a Perl  
module that can be shared by both those use-cases, and adds logic  
that deals with pg_dump output diffs in a much more tightly defined  
fashion.  
  
This largely supersedes previous efforts in commits 0df9641d3,  
9814ff550, and 62be9e4cd, which developed a SQL-script-based solution  
for the task of dropping old objects.  There was nothing fundamentally  
wrong with that work in itself, but it had no basis for solving the  
output-formatting problem.  The most plausible way to deal with  
formatting is to build a Perl module that can perform editing on the  
dump files; and once we commit to that, it makes more sense for the  
same module to also embed the knowledge of what has to be done for  
dropping old objects.  
  
Back-patch versions of the helper module as far as 9.2, to  
support buildfarm animals that still test that far back.  
It's also necessary to back-patch PostgreSQL/Version.pm,  
because the new code depends on that.  I fixed up pg_upgrade's  
002_pg_upgrade.pl in v15, but did not look into back-patching  
it further than that.  
  
Tom Lane and Andrew Dunstan  
  
Discussion: https://postgr.es/m/[email protected]  

A src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
A src/test/perl/PostgreSQL/Version.pm

Fix compilation warnings with libselinux 3.1 in contrib/sepgsql/

commit   : c58c0770ac047b78c8d803f29880a2708a7271ff    
  
author   : Michael Paquier <[email protected]>    
date     : Wed, 9 Nov 2022 09:40:09 +0900    
  
committer: Michael Paquier <[email protected]>    
date     : Wed, 9 Nov 2022 09:40:09 +0900    

Click here for diff

Upstream SELinux has recently marked security_context_t as officially  
deprecated, causing warnings with -Wdeprecated-declarations.  This is  
considered as legacy code for some time now by upstream as  
security_context_t got removed from most of the code tree during the  
development of 2.3 back in 2014.  
  
This removes all the references to security_context_t in sepgsql/ to be  
consistent with SELinux, fixing the warnings.  Note that this does not  
impact the minimum version of libselinux supported.  
  
This has been applied first as 1f32136 for 14~, but no other branches  
got the call.  This is in line with the recent project policy to have no  
warnings in branches where builds should still be supported (9.2~ as of  
today).  Per discussion with Tom Lane and Álvaro Herrera.  
  
Reviewed-by: Tom Lane  
Discussion: https://postgr.es/m/[email protected]  
Discussion: https://postgr.es/m/[email protected]  
Backpatch-through: 9.2  

M contrib/sepgsql/label.c
M contrib/sepgsql/selinux.c
M contrib/sepgsql/uavc.c

Rename parser token REF to REF_P to avoid a symbol conflict.

commit   : fec443414bbe82ae866eb15dab8cc4cc1847d838    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 16 Oct 2022 15:27:04 -0400    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 16 Oct 2022 15:27:04 -0400    

Click here for diff

In the latest version of Apple's macOS SDK, <sys/socket.h>  
fails to compile if "REF" is #define'd as something.  
Apple may or may not agree that this is a bug, and even if  
they do accept the bug report I filed, they probably won't  
fix it very quickly.  In the meantime, our back branches will all  
fail to compile gram.y.  v15 and HEAD currently escape the problem  
thanks to the refactoring done in 98e93a1fc, but that's purely  
accidental.  Moreover, since that patch removed a widely-visible  
inclusion of <netdb.h>, back-patching it seems too likely to break  
third-party code.  
  
Instead, change the token's code name to REF_P, following our usual  
convention for naming parser tokens that are likely to have symbol  
conflicts.  The effects of that should be localized to the grammar  
and immediately surrounding files, so it seems like a safer answer.  
  
Per project policy that we want to keep recently-out-of-support  
branches buildable on modern systems, back-patch all the way to 9.2.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/backend/parser/gram.y
M src/include/parser/kwlist.h

Fix configure's AC_CHECK_DECLS tests to work correctly with clang.

commit   : b8464d2f5da0d1abe0925c5712d0c4810986e629    
  
author   : Tom Lane <[email protected]>    
date     : Wed, 21 Sep 2022 15:42:00 -0400    
  
committer: Tom Lane <[email protected]>    
date     : Wed, 21 Sep 2022 15:42:00 -0400    

Click here for diff

Back-port commit 16fbac39f into 9.3 and 9.2, so that these  
out-of-support branches can be built with clang without wading  
through a pile of warnings about strlcpy and related functions.  
check_decls.m4 required some adaptation to work with autoconf 2.63,  
but nothing too major.  
  
Discussion: https://postgr.es/m/[email protected]  
Discussion: https://postgr.es/m/[email protected]  

M aclocal.m4
A config/check_decls.m4
M configure
M configure.in

Suppress more variable-set-but-not-used warnings from clang 15.

commit   : 850cb88e4b6003361963593ccd9fb0456dbe148f    
  
author   : Tom Lane <[email protected]>    
date     : Wed, 21 Sep 2022 13:52:38 -0400    
  
committer: Tom Lane <[email protected]>    
date     : Wed, 21 Sep 2022 13:52:38 -0400    

Click here for diff

Mop up assorted set-but-not-used warnings in the back branches.  
This includes back-patching relevant fixes from commit 152c9f7b8  
the rest of the way, but there are also several cases that did not  
appear in HEAD.  Some of those we'd fixed in a retail way but not  
back-patched, and others I think just got rewritten out of existence  
during nearby refactoring.  
  
While here, also back-patch b1980f6d0 (PL/Tcl: Fix compiler warnings  
with Tcl 8.6) into 9.2, so that that branch compiles warning-free  
with modern Tcl.  
  
Per project policy, this is a candidate for back-patching into  
out-of-support branches: it suppresses annoying compiler warnings  
but changes no behavior.  Hence, back-patch all the way to 9.2.  
  
Discussion: https://postgr.es/m/[email protected]  

M contrib/hstore/crc32.c
M contrib/ltree/crc32.c
M src/backend/access/gin/gindatapage.c
M src/backend/optimizer/util/var.c
M src/backend/parser/gram.y
M src/backend/utils/adt/array_typanalyze.c
M src/backend/utils/adt/varlena.c
M src/pl/tcl/pltcl.c

Disable -Wdeprecated-non-prototype in the back branches.

commit   : 5d3ce0d823c8133f22f65d858970b55747ebbb08    
  
author   : Tom Lane <[email protected]>    
date     : Tue, 20 Sep 2022 18:59:54 -0400    
  
committer: Tom Lane <[email protected]>    
date     : Tue, 20 Sep 2022 18:59:54 -0400    

Click here for diff

There doesn't seem to be any good ABI-preserving way to silence  
clang 15's -Wdeprecated-non-prototype warnings about our tree-walk  
APIs.  While we've fixed it properly in HEAD, the only way to not  
see hundreds of these in the back branches is to disable the  
warnings.  We're not going to do anything about them, so we might  
as well disable them.  
  
I noticed that we also get some of these warnings about fmgr.c's  
support for V0 function call convention, in branches before v10  
where we removed that.  That's another area we aren't going to  
change, so turning off the warning seems fine for that too.  
  
Per project policy, this is a candidate for back-patching into  
out-of-support branches: it suppresses annoying compiler warnings  
but changes no behavior.  Hence, back-patch all the way to 9.2.  
  
Discussion: https://postgr.es/m/CA+hUKGKpHPDTv67Y+s6yiC8KH5OXeDg6a-twWo_xznKTcG0kSA@mail.gmail.com  

M configure
M configure.in

Fix pl/perl test case so it will still work under Perl 5.36.

commit   : 6f9ea6cf3338711feb06f6e2468fa766d79381fd    
  
author   : Tom Lane <[email protected]>    
date     : Wed, 1 Jun 2022 16:15:47 -0400    
  
committer: Tom Lane <[email protected]>    
date     : Wed, 1 Jun 2022 16:15:47 -0400    

Click here for diff

Perl 5.36 has reclassified the warning condition that this test  
case used, so that the expected error fails to appear.  Tweak  
the test so it instead exercises a case that's handled the same  
way in all Perl versions of interest.  
  
This appears to meet our standards for back-patching into  
out-of-support branches: it changes no user-visible behavior  
but enables testing of old branches with newer tools.  
Hence, back-patch as far as 9.2.  
  
Dagfinn Ilmari Mannsåker, per report from Jitka Plesníková.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/pl/plperl/expected/plperl.out
M src/pl/plperl/sql/plperl.sql

Suppress variable-set-but-not-used warning from clang 13.

commit   : ad96696ead364347d4b492bf9a2d5b82bbe5a2d3    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 23 Jan 2022 11:09:00 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 23 Jan 2022 11:09:00 -0500    

Click here for diff

In the normal configuration where GEQO_DEBUG isn't defined,  
recent clang versions have started to complain that geqo_main.c  
accumulates the edge_failures count but never does anything  
with it.  As a minimal back-patchable fix, insert a void cast  
to silence this warning.  (I'd speculated about ripping out the  
GEQO_DEBUG logic altogether, but I don't think we'd wish to  
back-patch that.)  
  
Per recently-established project policy, this is a candidate  
for back-patching into out-of-support branches: it suppresses  
an annoying compiler warning but changes no behavior.  Hence,  
back-patch all the way to 9.2.  
  
Discussion: https://postgr.es/m/CA+hUKGLTSZQwES8VNPmWO9AO0wSeLt36OCPDAZTccT1h7Q7kTQ@mail.gmail.com  

M src/backend/optimizer/geqo/geqo_main.c

Make DLSUFFIX easily discoverable by build scripts

commit   : c7f3a00c3671ecea157f57847436e1cbdc3e053d    
  
author   : Andrew Dunstan <[email protected]>    
date     : Wed, 15 Dec 2021 17:57:10 -0500    
  
committer: Andrew Dunstan <[email protected]>    
date     : Wed, 15 Dec 2021 17:57:10 -0500    

Click here for diff

This will enable things like the buildfarm client to discover more  
reliably if certain libraries have been installed.  
  
Discussion: https://postgr.es/m/[email protected]  
  
This is a backpatch to 9.3 and 9.2 of commits b40cb99b85 and d9cdb1ba9e  
now that we are supporting limited builds of older versions.  

M src/Makefile.global.in

Suppress -Warray-bounds warning in 9.2's xlog.c.

commit   : 985c8de212faa5a4c983005d4192fb7e543cf5ab    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 11:57:11 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 11:57:11 -0500    

Click here for diff

Late-model gcc delivers a confusing warning "'memcpy' offset [0, 63]  
is out of the bounds [0, 0]" here, which turns out to be because it  
thinks the "record" pointer might be NULL, which again is because  
it doesn't know ereport(PANIC) won't return.  The least invasive  
way to fix that is to insert a couple of abort() calls.  It's  
surprising/fortunate that we don't have this issue in more places  
... but this is the last remaining build warning with gcc 11.2.1,  
so I'll settle for a narrow fix.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/backend/access/transam/xlog.c

Suppress -Wformat-overflow warnings in 9.2's xml.c.

commit   : 3f9700acb238fced605ff3ef155e179290fd4f02    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 11:21:58 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 11:21:58 -0500    

Click here for diff

If not using --with-libxml, late-model gcc complains about "'%s'  
directive argument is null" in places where xml.c passes the result  
of map_sql_identifier_to_xml_name() to %s.  That's not so surprising,  
because without USE_LIBXML the body of that function is  
  
	NO_XML_SUPPORT();  
	return NULL;  
  
and before 9.3 the compiler won't understand that NO_XML_SUPPORT()  
doesn't return.  Silence the warnings by returning "" instead.  
We don't need this hack in later branches, AFAICT.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/backend/utils/adt/xml.c

Disable -Wsometimes-uninitialized warnings in the 9.2 branch.

commit   : cea316881f1f109fe06243f1294313ead913b498    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 01:28:13 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 01:28:13 -0500    

Click here for diff

In 9.2, we didn't yet teach the compiler that elog(ERROR) doesn't  
return, which means that the compiler's opinion about whether  
variable dereferences are reachable isn't worth much.  Back-patching  
the commits that fixed that seems unduly invasive, so instead silence  
related complaints with a big hammer.  
  
-Wsometimes-uninitialized is a clang-ism; gcc seems to spell  
this warning option differently.  However, I do not observe  
any such compiler warnings in 9.2 with gcc 11.2.1, so for now  
we needn't do anything for gcc.  
  
Discussion: https://postgr.es/m/[email protected]  

M configure
M configure.in

Fix function return type confusion

commit   : 468773837bed4051c9791fd2d6d2c9558daeacb7    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 00:51:48 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 00:51:48 -0500    

Click here for diff

When parse_hba_line's return type was changed from bool to a pointer,  
the MANDATORY_AUTH_ARG macro wasn't adjusted.  
  
This back-patches commit c74d586d2 into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress scary-looking warnings so that people building these  
branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/backend/libpq/hba.c

Fix compiler warning

commit   : 98274e8fe7a0eba81b5ae7328138a46a3af01955    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 00:24:41 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 00:24:41 -0500    

Click here for diff

With some newer gcc versions (8 and 9) you get a -Wformat-overflow  
warning here.  In PG11 and later this was already fixed.  Since it's  
trivial, backport it to get the older branches building without  
warnings.  
  
This back-patches commit 333a186dc into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress scary-looking warnings so that people building these  
branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Discussion: https://postgr.es/m/[email protected]  

M contrib/pgbench/pgbench.c

Silence another gcc 11 warning.

commit   : 265b96a96af21958989efeb7ee4b3c0129f75ae5    
  
author   : Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 00:08:37 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Mon, 13 Dec 2021 00:08:37 -0500    

Click here for diff

Per buildfarm and local experimentation, bleeding-edge gcc isn't  
convinced that the MemSet in reorder_function_arguments() is safe.  
Shut it up by adding an explicit check that pronargs isn't negative,  
and by changing MemSet to memset.  (It appears that either change is  
enough to quiet the warning at -O2, but let's do both to be sure.)  
  
This back-patches commit 1046dbedd into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress scary-looking warnings so that people building these  
branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/backend/optimizer/util/clauses.c

Suppress -Warray-parameter warnings in pgcrypto/sha2.c.

commit   : d754ccc1ec9f367ef7bbcf0fa4bc230d04a2c341    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 20:24:53 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 20:24:53 -0500    

Click here for diff

This is exactly the same problem as commit 1b242f42b fixed in ecpg,  
but in contrib/pgcrypto.  Commit 273c458a2 eliminated the problem  
here for v10 and up.  We hadn't noticed for exactly the same reasons  
enumerated in bbbf22cf3.  
  
Back-patch down to 9.2, pursuant to newly-established project policy  
about keeping out-of-support branches buildable.  
  
Discussion: https://postgr.es/m/[email protected]  

M contrib/pgcrypto/sha2.c

Reformat imath.c macro to remove -Wmisleading-indentation warnings.

commit   : a86312362da4175baf2c899645b4dfb08625f50f    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 19:12:27 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 19:12:27 -0500    

Click here for diff

Recent versions of gcc whine about the admittedly-completely-illegible  
formatting of this macro.  We've not noticed for a few reasons:  
  
* In v12 and up, the problem is gone thanks to 48e24ba6b.  
(Back-patching that doesn't seem prudent, though, so this patch  
just manually improves the macro's formatting.)  
  
* Buildfarm animals that might have complained, such as caiman,  
do not because they use --with-openssl and so don't build imath.c.  
  
* In a manual run such as "make all check-world", you won't see the  
warning because it gets buried in an install.log file.  You have to  
do "make -C contrib all" or the like to see it.  
  
I noticed this because in older branches, the last bit doesn't  
happen so "check-world" actually does spew the warnings to stderr.  
Maybe we should rethink how that works, because the newer behavior  
is not an improvement IMO.  
  
Back-patch down to 9.2, pursuant to newly-established project policy  
about keeping out-of-support branches buildable.  
  
Discussion: https://postgr.es/m/[email protected]  

M contrib/pgcrypto/imath.c

Clean up compilation warnings coming from PL/Perl with clang-12~

commit   : ebd952f3f453d3074b99632e07d54f3dc5eb55d1    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 18:06:15 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 18:06:15 -0500    

Click here for diff

clang-12 has introduced -Wcompound-token-split-by-macro, that is causing  
a large amount of warnings when building PL/Perl because of its  
interactions with upstream Perl.  This commit adds one -Wno to CFLAGS at  
./configure time if the flag is supported by the compiler to silence all  
those warnings.  
  
This back-patches commit 9ff47ea41 into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress scary-looking warnings so that people building these  
branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Discussion: https://postgr.es/m/[email protected]  

M configure
M configure.in

Make ecpg's rjulmdy() and rmdyjul() agree with their declarations.

commit   : 87671beecf53caa9e4633a7b32d3f06c01c1a333    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 16:59:22 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 16:59:22 -0500    

Click here for diff

We had "short *mdy" in the extern declarations, but "short mdy[3]"  
in the actual function definitions.  Per C99 these are equivalent,  
but recent versions of gcc have started to issue warnings about  
the inconsistency.  Clean it up before the warnings get any more  
widespread.  
  
This back-patches commit 1b242f42b into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress scary-looking warnings so that people building these  
branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/interfaces/ecpg/compatlib/informix.c

Use -Wno-format-truncation and -Wno-stringop-truncation, if available.

commit   : 276c017f12fe6ecbd07bebaff00768ec34f2ea21    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 16:46:14 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 16:46:14 -0500    

Click here for diff

This back-patches commit e71658523 into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress scary-looking warnings so that people building these  
branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Also back-patch the adjacent test from commit 73b416b2e (Suppress  
clang's unhelpful gripes about -pthread switch being unused) and  
the necessary autoconf macro from fdea2530b.  
  
Discussion: https://postgr.es/m/[email protected]  

M config/c-compiler.m4
M configure
M configure.in

Make pg_upgrade's test.sh less chatty.

commit   : a4061eeaf34a06fa1c05e28bfc9e984a14bb1073    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 16:14:25 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 16:14:25 -0500    

Click here for diff

Remove "set -x", and pass "-A trust" to initdb explicitly,  
to suppress almost all of the noise this script used to emit  
on stderr.  
  
This back-patches commit eb9812f27 into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress useless noise on stderr when running check-world.  
  
Discussion: https://postgr.es/m/[email protected]  

M contrib/pg_upgrade/test.sh

Add checks for valid multibyte character length in UtfToLocal, LocalToUtf.

commit   : 70c64135d0a1715291b4a488df7377bf87207f8c    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 15:59:00 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 15:59:00 -0500    

Click here for diff

This back-patches commit d9f37e666 into out-of-support branches,  
pursuant to newly-established project policy.  The point is to  
suppress "uninitialized variable" warnings so that people building  
these branches needn't expend brain cells verifying that it's safe  
to ignore the warnings.  
  
Discussion: https://postgr.es/m/[email protected]  

M src/backend/utils/mb/conv.c

Use return instead of exit() in configure

commit   : fed9cf2cb9ef4cdc3fe8b09dc2eb19e82fe1cc8b    
  
author   : Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 14:54:37 -0500    
  
committer: Tom Lane <[email protected]>    
date     : Sun, 12 Dec 2021 14:54:37 -0500    

Click here for diff

Using exit() requires stdlib.h, which is not included.  Use return  
instead.  Also add return type for main().  
  
This back-patches commit 1c0cf52b3 into out-of-support branches,  
pursuant to a newly-established project policy that we'll try to keep  
out-of-support branches buildable on modern platforms for at least  
ten major releases back, ensuring people can test pg_dump and psql  
compatibility against servers that far back.  With the current  
development branch being v15, that works out to keeping 9.2 and up  
buildable as of today.  
  
This fix is needed to get through 'configure' when using recent  
macOS (and possibly other clang-based toolchains).  It seems to  
be sufficient to get through 'check-world', although there are  
annoyances such as compiler warnings, which will be dealt with  
separately.  
  
Original patch by Peter Eisentraut  
  
Discussion: https://postgr.es/m/[email protected]  

M config/c-compiler.m4
M config/c-library.m4
M configure