pgsql: Correct some uses of e.g. and i.e. in message strings and docume

2022-07-13 Thread John Naylor
Correct some uses of e.g. and i.e. in message strings and documentation E.g. means "for example" and i.e. means "that is". Fix a couple uses that don't match the intended meaning. Kyotaro Horiguchi Reviewed by Junwang Zhao and Aleksander Alekseev, with one addition by me Discussion: https://www

pgsql: Remove support for Visual Studio 2013

2022-07-13 Thread Michael Paquier
Remove support for Visual Studio 2013 No members of the buildfarm are using this version of Visual Studio, resulting in all the code cleaned up here as being mostly dead, and VS2017 is the oldest version still supported. More versions could be cut, but the gain would be minimal, while removing on

pgsql: Fix output of createuser --help with --valid-until

2022-07-13 Thread Michael Paquier
Fix output of createuser --help with --valid-until The argument required by --valid-until, a timestamp string, was missing in the description of --help. Author: Shinoda, Noriyoshi Reviewed-by: Nathan Bossart Discussion: https://postgr.es/m/[email protected]

pgsql: Revert "Use wildcards instead of manually-maintained file lists

2022-07-13 Thread Tom Lane
Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." This reverts commit 617d69141220f277170927e03a19d2f1b77aed77. While I still think the basic idea is attractive, we need to sort out what happens with built .c files, and there also seem to be VPATH issues. Branch --

pgsql: Mop up pg_upgrade's nls.mk for commit b0a55e432.

2022-07-13 Thread Tom Lane
Mop up pg_upgrade's nls.mk for commit b0a55e432. We'll do this the hard way for today. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a5f9f1b885a8f6bdc5b393736f1399986afdef

Re: pgsql: Avoid unsatisfied-external-reference errors in static inlines.

2022-07-13 Thread Tom Lane
Peter Eisentraut writes: > What platforms did this fail on? How can one observe the failure locally? wrasse at least: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=wrasse&dt=2022-07-13%2014%3A49%3A17 I think possibly you could duplicate the problem with gcc by using -fkeep-inline-fun

Re: pgsql: Avoid unsatisfied-external-reference errors in static inlines.

2022-07-13 Thread Peter Eisentraut
On 13.07.22 19:37, Tom Lane wrote: Avoid unsatisfied-external-reference errors in static inlines. Commit 9c727360b neglected the lesson we've learned before: protect references to backend global variables with #ifndef FRONTEND. What platforms did this fail on? How can one observe the failure

pgsql: Avoid unsatisfied-external-reference errors in static inlines.

2022-07-13 Thread Tom Lane
Avoid unsatisfied-external-reference errors in static inlines. Commit 9c727360b neglected the lesson we've learned before: protect references to backend global variables with #ifndef FRONTEND. Since there's already a place for static inlines in this file, move the just-converted functions to that

pgsql: Use wildcards instead of manually-maintained file lists in */nls

2022-07-13 Thread Tom Lane
Use wildcards instead of manually-maintained file lists in */nls.mk. The backend already used a mechanically-generated list of *.c files, but everywhere else we had a manually-written-out list of files in which to seek translatable messages. Commit b0a55e432 contains the latest in a long line of

pgsql: Remove artificial restrictions on which node types have out/read

2022-07-13 Thread Tom Lane
Remove artificial restrictions on which node types have out/read funcs. The initial version of gen_node_support.pl manually excluded most utility statement node types from having out/read support, and also some raw-parse-tree-only node types. That was mostly to keep the output comparable to the o

pgsql: Convert macros to static inline functions (itemptr.h)

2022-07-13 Thread Peter Eisentraut
Convert macros to static inline functions (itemptr.h) Reviewed-by: Amul Sul Discussion: https://www.postgresql.org/message-id/flat/5b558da8-99fb-0a99-83dd-f72f05388517%40enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/aeb767ca0b0243d0c8c0eae2e1a43

pgsql: Convert macros to static inline functions (bufmgr.h)

2022-07-13 Thread Peter Eisentraut
Convert macros to static inline functions (bufmgr.h) Reviewed-by: Amul Sul Discussion: https://www.postgresql.org/message-id/flat/5b558da8-99fb-0a99-83dd-f72f05388517%40enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9c727360bcc77cf88693129cd6e610

pgsql: Plug memory leak

2022-07-13 Thread Alvaro Herrera
Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e1df03b80d51e093f

pgsql: Fix flag tests in src/test/modules/test_oat_hooks

2022-07-13 Thread Alvaro Herrera
Fix flag tests in src/test/modules/test_oat_hooks In what must have been a copy'n paste mistake, all the flag tests use the same flag rather than a different flag each. The bug is not suprising, considering that it's dead code; add a minimal, testimonial line to cover it. This is all pretty inco

pgsql: Plug memory leak

2022-07-13 Thread Alvaro Herrera
Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9e038d6907

pgsql: Plug memory leak

2022-07-13 Thread Alvaro Herrera
Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e690930704

pgsql: Allow specifying STORAGE attribute for a new table

2022-07-13 Thread Peter Eisentraut
Allow specifying STORAGE attribute for a new table Previously, the STORAGE specification was only available in ALTER TABLE. This makes it available in CREATE TABLE as well. Also make the code and the documentation for STORAGE and COMPRESSION attributes consistent. Author: Teodor Sigaev Author:

Re: pgsql: Fix for make unportability

2022-07-13 Thread Peter Eisentraut
On 13.07.22 09:45, Alvaro Herrera wrote: I suppose if we're getting rid of Make soon (we are not) > it's not really very useful> to make this more make-ish: AVAIL_LANGUAGES := $(file <$(srcdir)/po/LINGUAS) I had never seen this syntax. The GNU make changelog reveals that it is new in v

pgsql: Remove useless assertions

2022-07-13 Thread Peter Eisentraut
Remove useless assertions We don't need Assert(IsA(foo, String)) right before running strVal(foo), since strVal() already does the assertion internally (via castNode()). Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/503e3833ef240c94e114be8703046d52f24da021 Modifi

pgsql: Fix XID list support some more

2022-07-13 Thread Alvaro Herrera
Fix XID list support some more Read/out support in 5ca0fe5c8ad7 was missing/incomplete, per Tom Lane. Again, as far as core is concerned, this is not only dead code but also untested; however, third parties may come to rely on it, so the standard features should work. Discussion: https://postgr.e

Re: pgsql: Fix for make unportability

2022-07-13 Thread Alvaro Herrera
On 2022-Jul-13, Peter Eisentraut wrote: > Fix for make unportability > > 88dad06b47eb80f699211c9b0b7a1c6d9016ad19 contains a make $(shell) > construct that apparently confuses older GNU make versions (possibly > because of the # inside the shell command?). This construct, which > would allow # c

pgsql: Fix for make unportability

2022-07-13 Thread Peter Eisentraut
Fix for make unportability 88dad06b47eb80f699211c9b0b7a1c6d9016ad19 contains a make $(shell) construct that apparently confuses older GNU make versions (possibly because of the # inside the shell command?). This construct, which would allow # comments inside LINGUAS files, was adapted from gettex