- 02 Jun, 2019 4 commits
-
-
Tom Lane authored
Perl likes to redefine the _() macro: #ifdef CAN_PROTOTYPE #define _(args) args #else ... There was lots not to like about the way we dealt with this before: 1. Instead of taking care of the conflict centrally in plperl.h, we expected every one of its ever-growing number of includers to do so. This is duplicative and error-prone in itself, plus it means that plperl.h fails to meet the expectation of being compilable standalone, resulting in macro-redefinition warnings in cpluspluscheck. 2. We left _() with its Perl definition, meaning that if someone tried to use it in any Perl-related extension, it would silently fail to provide run-time translation. I don't see any live bugs of this ilk, but it's clearly a hard-to-notice bug waiting to happen. So fix that by centralizing the cleanup logic, making it match what we're already doing for other macro conflicts with Perl. Since we only expect plperl.h to be included by extensions not core code, we should redefine _() as dgettext() not gettext().
-
Tom Lane authored
-
Tom Lane authored
Declaring a function "inline" still doesn't work with Windows compilers (C99? what's that?), unless the macro provided by pg_config.h is in-scope, which it is not in our ECPG test programs. So the workaround I tried to use in commit 7640f931 doesn't work for Windows. Revert the change in printf_hack.h, and instead just blacklist that file in cpluspluscheck --- since it's a not-installed test file, we don't really need to verify its C++ cleanliness anyway.
-
Alvaro Herrera authored
This test module was not getting invoked, other than at compile time, limiting its usefulness -- and keeping its coverage at 0%. Add a minimal regression test to ensure it runs on make check-world; this makes it 92% covered (line-wise), which seems sufficient. Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20190529193256.GA17603@alvherre.pgsql
-
- 01 Jun, 2019 1 commit
-
-
Michael Paquier authored
Support of CHECK OPTION for updatable views has been added in 9.4, but the documentation of information_schema never got the call even if the information displayed is correct. Author: Gilles Darold Discussion: https://postgr.es/m/75d07704-6c74-4f26-656a-10045c01a17e@darold.net Backpatch-through: 9.4
-
- 31 May, 2019 9 commits
-
-
Tom Lane authored
Formerly, cpluspluscheck was only meant to examine headers that we thought of as exported --- but its notion of what we export was well behind the times. Let's just make it check *all* .h files, except for a well-defined blacklist, instead. While at it, improve its ability to use a C++ compiler other than g++, by scraping the CXX setting from Makefile.global and making it possible to override the warning options used (per suggestion from Andres Freund). Discussion: https://postgr.es/m/b517ec3918d645eb950505eac8dd434e@gaz-is.ru
-
Andres Freund authored
Previously cpluspluscheck wouldn't work in vpath builds, this commit fixes that. To make it easier to invoke, there's a top-level cpluspluscheck target. Discussion: https://postgr.es/20190530220244.kiputcbl4gkl2oo6@alap3.anarazel.de
-
David Rowley authored
Author: Antonin Houska Discussion: https://postgr.es/m/22370.1559293357@localhost
-
Tom Lane authored
Mea culpa for not rechecking check-world at the last step :-( Per buildfarm.
-
Tom Lane authored
There's probably no need to back-patch this, since it seems unlikely that anybody would be inserting C++ code into ecpg's preprocessor. Discussion: https://postgr.es/m/b517ec3918d645eb950505eac8dd434e@gaz-is.ru
-
Tom Lane authored
Rename some exposed parameters so that they don't conflict with C++ reserved words. Back-patch to all supported versions. George Tarasov Discussion: https://postgr.es/m/b517ec3918d645eb950505eac8dd434e@gaz-is.ru
-
Tom Lane authored
We have a longstanding project convention that all .h files should be includable with no prerequisites other than postgres.h. This is tested/relied-on by cpluspluscheck. However, cpluspluscheck has not historically been applied to most headers outside the src/include tree, with the predictable consequence that some of them don't work. Fix that, usually by adding missing #include dependencies. The change in printf_hack.h might require some explanation: without it, my C++ compiler whines that the function is unused. There's not so many call sites that "inline" is going to cost much, and besides all the callers are in test code that we really don't care about the size of. There's no actual bugs being fixed here, so I see no need to back-patch. Discussion: https://postgr.es/m/b517ec3918d645eb950505eac8dd434e@gaz-is.ru
-
Tom Lane authored
While C is happy to cast "const void *" to "const unsigned char *" silently, C++ insists on an explicit cast. Since we put these functions into header files, cpluspluscheck whines about that. Add the cast to pacify it. Discussion: https://postgr.es/m/b517ec3918d645eb950505eac8dd434e@gaz-is.ru
-
Alvaro Herrera authored
New in 147e3722.
-
- 30 May, 2019 3 commits
-
-
Michael Paquier authored
This makes the tool consistent with the option set of oid2name, which has been historically using -f for filenodes, and has more recently gained long options and --filenode via 1aaf532d. Reported-by: Peter Eisentraut Author: Fabien Coelho Discussion: https://postgr.es/m/97045260-fb9e-e145-a950-cf7d28c4eaea@2ndquadrant.com
-
Andres Freund authored
Interestingly only C++ compilers have, so far, complained about this odd forward declaration. This originated when IndexBuildCallback was defined in another file, but now is completely unnecessary (but was wrong before too, cpluspluscheck just wouldn't have noticed). Reported-By: Tom Lane Discussion: https://postgr.es/m/53941.1559239260@sss.pgh.pa.us
-
Tomas Vondra authored
Most errors reported in extended statistics are internal issues, and so should use elog(). The MCV list code was already following this rule, but the functional dependencies and ndistinct coefficients were using a mix of elog() and ereport(). Fix this by changing most places to elog(), with the exception of input functions. This is a mostly cosmetic change, it makes the life a little bit easier for translators, as elog() messages are not translated. So backpatch to PostgreSQL 10, where extended statistics were introduced. Author: Tomas Vondra Backpatch-through: 10 where extended statistics were added Discussion: https://postgr.es/m/20190503154404.GA7478@alvherre.pgsql
-
- 29 May, 2019 3 commits
-
-
Michael Paquier authored
Author: Guillaume Lelarge Discussion: https://postgr.es/m/CAECtzeWPz4JikzUqZdMjqPTe8dAP3nZxPD-58Y-Hhvirg0fF+A@mail.gmail.com
-
Michael Paquier authored
This got forgotten in f56f8f which has added foreign key support for partitioned tables. In passing, add a mention about caveats applying to tables partitioned using inheritance regarding indexes and foreign keys. Author: Paul A Jungwirth Reviewed-by: Amit Langote, Michael Paquier Discussion: https://postgr.es/m/CA+renyUuSmYgmZjKc_DfUNVZ0uttF91-FwhDVW3F7WEPj0jL5w@mail.gmail.com
-
Alvaro Herrera authored
-
- 28 May, 2019 7 commits
-
-
Alvaro Herrera authored
I introduced the typo in source code in the course of 75445c15. Repair.
-
Noah Misch authored
When this suite runs installcheck, redirect file creations from src/test/regress to src/bin/pg_upgrade/tmp_check/regress. This closes a race condition in "make -j check-world". If the pg_upgrade suite wrote to a given src/test/regress/results file in parallel with the regular src/test/regress invocation writing it, a test failed spuriously. Even without parallelism, in "make -k check-world", the suite finishing second overwrote the other's regression.diffs. This revealed test "largeobject" assuming @abs_builddir@ is getcwd(), so fix that, too. Buildfarm client REL_10, released fifty-four days ago, supports saving regression.diffs from its new location. When an older client reports a pg_upgradeCheck failure, it will no longer include regression.diffs. Back-patch to 9.5, where pg_upgrade moved to src/bin. Reviewed (in earlier versions) by Andrew Dunstan. Discussion: https://postgr.es/m/20181224034411.GA3224776@rfd.leadboat.com
-
Noah Misch authored
This allows "vcregress upgradecheck" to pass twice in immediate succession, and it's more like how $(prove_check) works. Back-patch to 9.5, where pg_upgrade moved to src/bin. Discussion: https://postgr.es/m/20190520012436.GA1480421@rfd.leadboat.com
-
Andres Freund authored
Mea culpa.
-
Peter Eisentraut authored
This code block was copied/adapted from other similar places but somehow the comment placement was changed so that it makes less sense.
-
Bruce Momjian authored
Reported-by: Gaby Schilders
-
Michael Paquier authored
Author: Gurjeet Singh Discussion: https://postgr.es/m/CABwTF4U_5kEnH93PXZEuEsZHuoSSuBEOqC6pian8vDfLZSQJNA@mail.gmail.com
-
- 27 May, 2019 1 commit
-
-
Peter Eisentraut authored
The old text still had an implicit reference to the virtual behavior, which was not in the final patch. Author: Tobias Bussmann <t.bussmann@gmx.net>
-
- 26 May, 2019 4 commits
-
-
Amit Kapila authored
Reported-by: Alexander Lakhin Author: Alexander Lakhin Reviewed-by: Amit Kapila and Tom Lane Discussion: https://postgr.es/m/7208de98-add8-8537-91c0-f8b089e2928c@gmail.com
-
Peter Eisentraut authored
Change extension for Graphviz files from .dot to .gv. The latter appears to be the generally preferred one nowadays. Discussion: https://www.postgresql.org/message-id/flat/71fe76d2-c7d7-2acc-6762-bbf9e61c566e%402ndquadrant.com
- 25 May, 2019 1 commit
-
-
Amit Kapila authored
Reported-by: Euler Taveira Author: Euler Taveira Discussion: https://postgr.es/m/CAHE3wgjiA8DdnUzH9WqBLxdrUVvjDkKNdHx-MkEg9uV+HtpMfg@mail.gmail.com
-
- 24 May, 2019 3 commits
-
-
Tom Lane authored
Per bug #15819 from Koizumi Satoru. Discussion: https://postgr.es/m/15819-e6191bef1f7334c0@postgresql.org
-
Thomas Munro authored
Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CA%2BhUKGJFWXmtYo6Frd77RR8YXCHz7hJ2mRy5aHV%3D7fJOqDnBHA%40mail.gmail.com
-
Thomas Munro authored
Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CA%2BhUKGJFWXmtYo6Frd77RR8YXCHz7hJ2mRy5aHV%3D7fJOqDnBHA%40mail.gmail.com
-
- 23 May, 2019 4 commits
-
-
Andres Freund authored
Some of the wrapper functions didn't match the callback names. Many of them due to staying "consistent" with historic naming of the wrapped functionality. We decided that for most cases it's more important to be for tableam to be consistent going forward, than with the past. The one exception is beginscan/endscan/... because it'd have looked odd to have systable_beginscan/endscan/... with a different naming scheme, and changing the systable_* APIs would have caused way too much churn (including breaking a lot of external users). Author: Ashwin Agrawal, with some small additions by Andres Freund Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CALfoeiugyrXZfX7n0ORCa4L-m834dzmaE8eFdbNR6PMpetU4Ww@mail.gmail.com
-
Michael Paquier authored
The access method name "amname" can be dumped as of 3b925e90, but queries for backends older than 9.5 forgot to map it to a dummy NULL value, causing the column to not be mapped to a number. As a result, pg_dump was throwing some spurious errors in its stderr output coming from libpq: pg_dump: column number -1 is out of range 0..36 Fix this issue by adding a mapping of "amname" to NULL to all the older queries. Discussion: https://postgr.es/m/20190522083038.GA16837@paquier.xyz Author: Michael Paquier Reviewed-by: Dmitry Dolgov, Andres Freund, Tom Lane
-
Andres Freund authored
On master (after 700538) the old version's installed psql was used - even when the old version might not actually be installed / might be installed into a temporary directory. As commonly the case when just executing make check for pg_upgrade, as $oldbindir is just the current version's $bindir. In the back branches, with --install specified, psql from the new version's temporary installation was used, without --install (e.g for NO_TEMP_INSTALL, cf 47b3c266), the new version's installed psql was used (which might or might not exist). Author: Andres Freund Discussion: https://postgr.es/m/20190522175150.c26f4jkqytahajdg@alap3.anarazel.de
-
Andrew Gierth authored
When there were duplicate columns in the hash key list, the array sizes could be miscomputed, resulting in access off the end of the array. Adjust the computation to ensure the array is always large enough. (I considered whether the duplicates could be removed in planning, but I can't rule out the possibility that duplicate columns might have different hash functions assigned. Simpler to just make sure it works at execution time regardless.) Bug apparently introduced in fc4b3dea as part of narrowing down the tuples stored in the hashtable. Reported by Colm McHugh of Salesforce, though I didn't use their patch. Backpatch back to version 10 where the bug was introduced. Discussion: https://postgr.es/m/CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com
-