pgsql: Don't qualify type pg_catalog.text in extend-extensions-example.

2018-03-23 Thread Noah Misch
Don't qualify type pg_catalog.text in extend-extensions-example. Extension scripts begin execution with pg_catalog at the front of the search path, so type names reliably refer to pg_catalog. Remove these superfluous qualifications. Earlier of this already omitted them. Back-patch to 9.3 (all

pgsql: Don't qualify type pg_catalog.text in extend-extensions-example.

2018-03-23 Thread Noah Misch
Don't qualify type pg_catalog.text in extend-extensions-example. Extension scripts begin execution with pg_catalog at the front of the search path, so type names reliably refer to pg_catalog. Remove these superfluous qualifications. Earlier of this already omitted them. Back-patch to 9.3 (all

pgsql: Don't qualify type pg_catalog.text in extend-extensions-example.

2018-03-23 Thread Noah Misch
Don't qualify type pg_catalog.text in extend-extensions-example. Extension scripts begin execution with pg_catalog at the front of the search path, so type names reliably refer to pg_catalog. Remove these superfluous qualifications. Earlier of this already omitted them. Back-patch to 9.3 (all

pgsql: Don't qualify type pg_catalog.text in extend-extensions-example.

2018-03-23 Thread Noah Misch
Don't qualify type pg_catalog.text in extend-extensions-example. Extension scripts begin execution with pg_catalog at the front of the search path, so type names reliably refer to pg_catalog. Remove these superfluous qualifications. Earlier of this already omitted them. Back-patch to 9.3 (all

pgsql: Don't qualify type pg_catalog.text in extend-extensions-example.

2018-03-23 Thread Noah Misch
Don't qualify type pg_catalog.text in extend-extensions-example. Extension scripts begin execution with pg_catalog at the front of the search path, so type names reliably refer to pg_catalog. Remove these superfluous qualifications. Earlier of this already omitted them. Back-patch to 9.3 (all

pgsql: Don't qualify type pg_catalog.text in extend-extensions-example.

2018-03-23 Thread Noah Misch
Don't qualify type pg_catalog.text in extend-extensions-example. Extension scripts begin execution with pg_catalog at the front of the search path, so type names reliably refer to pg_catalog. Remove these superfluous qualifications. Earlier of this already omitted them. Back-patch to 9.3 (all

pgsql: Small refactoring

2018-03-23 Thread Peter Eisentraut
Small refactoring Put the "atomic" argument of ExecuteDoStmt() and ExecuteCallStmt() into a variable instead of repeating the formula. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/52f3a9d6a32c0c070a15486c3aecbc4405d2da88 Modified Files -- src/backend

Re: pgsql: Fix interaction of Perl and stdbool.h

2018-03-23 Thread Tom Lane
Peter Eisentraut writes: > Well, that's what we had before, but that crashed on the 4-byte bool > platforms. So the fix I pushed does that only if PostgreSQL is using > stdbool.h. It works for me on CentOS 6 now. Works for me too, thanks! regards, tom lane

Re: pgsql: Fix interaction of Perl and stdbool.h

2018-03-23 Thread Peter Eisentraut
On 3/23/18 12:19, David Steele wrote: > On 3/23/18 11:49 AM, Tom Lane wrote: >> Peter Eisentraut writes: >>> Fix interaction of Perl and stdbool.h >> >> Not sure if this broke it or it was already broken, but my compiler >> is now very unhappy. >> >> In file included from /usr/lib64/perl5/CORE/per

pgsql: Further fix interaction of Perl and stdbool.h

2018-03-23 Thread Peter Eisentraut
Further fix interaction of Perl and stdbool.h In the case that PostgreSQL uses stdbool.h but Perl doesn't, we need to prevent Perl from defining bool, to prevent compiler warnings about redefinition. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/66ee8513d10fb20790

pgsql: Fix make rules that generate multiple output files.

2018-03-23 Thread Tom Lane
Fix make rules that generate multiple output files. For years, our makefiles have correctly observed that "there is no correct way to write a rule that generates two files". However, what we did is to provide empty rules that "generate" the secondary output files from the primary one, and that's

pgsql: Fix make rules that generate multiple output files.

2018-03-23 Thread Tom Lane
Fix make rules that generate multiple output files. For years, our makefiles have correctly observed that "there is no correct way to write a rule that generates two files". However, what we did is to provide empty rules that "generate" the secondary output files from the primary one, and that's

pgsql: Fix make rules that generate multiple output files.

2018-03-23 Thread Tom Lane
Fix make rules that generate multiple output files. For years, our makefiles have correctly observed that "there is no correct way to write a rule that generates two files". However, what we did is to provide empty rules that "generate" the secondary output files from the primary one, and that's

pgsql: Fix make rules that generate multiple output files.

2018-03-23 Thread Tom Lane
Fix make rules that generate multiple output files. For years, our makefiles have correctly observed that "there is no correct way to write a rule that generates two files". However, what we did is to provide empty rules that "generate" the secondary output files from the primary one, and that's

pgsql: Fix make rules that generate multiple output files.

2018-03-23 Thread Tom Lane
Fix make rules that generate multiple output files. For years, our makefiles have correctly observed that "there is no correct way to write a rule that generates two files". However, what we did is to provide empty rules that "generate" the secondary output files from the primary one, and that's

pgsql: Fix make rules that generate multiple output files.

2018-03-23 Thread Tom Lane
Fix make rules that generate multiple output files. For years, our makefiles have correctly observed that "there is no correct way to write a rule that generates two files". However, what we did is to provide empty rules that "generate" the secondary output files from the primary one, and that's

Re: pgsql: Fix interaction of Perl and stdbool.h

2018-03-23 Thread David Steele
On 3/23/18 11:49 AM, Tom Lane wrote: > Peter Eisentraut writes: >> Fix interaction of Perl and stdbool.h > > Not sure if this broke it or it was already broken, but my compiler > is now very unhappy. > > In file included from /usr/lib64/perl5/CORE/perl.h:2424, > from plperl.h:60

pgsql: Exclude unlogged tables from base backups

2018-03-23 Thread Teodor Sigaev
Exclude unlogged tables from base backups Exclude unlogged tables from base backup entirely except init fork which marks created unlogged table. The next question is do not backup temp table but it's a story for separate patch. Author: David Steele Review by: Adam Brightwell, Masahiko Sawada Disc

Re: pgsql: Fix interaction of Perl and stdbool.h

2018-03-23 Thread Tom Lane
Peter Eisentraut writes: > Fix interaction of Perl and stdbool.h Not sure if this broke it or it was already broken, but my compiler is now very unhappy. In file included from /usr/lib64/perl5/CORE/perl.h:2424, from plperl.h:60, from SPI.xs:18: /usr/lib64/perl5/

pgsql: Fix interaction of Perl and stdbool.h

2018-03-23 Thread Peter Eisentraut
Fix interaction of Perl and stdbool.h Revert the PL/Perl-specific change in 9a95a77d9d5d3003d2d67121f2731b6e5fc37336. We must not prevent Perl from using stdbool.h when it has been built to do so, even if it uses an incompatible size. Otherwise, we would be imposing our bool on Perl, which will

pgsql: pg_resetwal: Prevent division-by-zero errors

2018-03-23 Thread Peter Eisentraut
pg_resetwal: Prevent division-by-zero errors Handle the case where the pg_control file specifies a WAL segment size of 0 bytes. This would previously have led to a division by zero error. Change this to assume the whole file is corrupt and go to guess everything. Discussion: https://www.postgre

pgsql: Allow FOR EACH ROW triggers on partitioned tables

2018-03-23 Thread Alvaro Herrera
Allow FOR EACH ROW triggers on partitioned tables Previously, FOR EACH ROW triggers were not allowed in partitioned tables. Now we allow AFTER triggers on them, and on trigger creation we cascade to create an identical trigger in each partition. We also clone the triggers to each partition that

pgsql: pg_resetwal: Add simple test suite

2018-03-23 Thread Peter Eisentraut
pg_resetwal: Add simple test suite Some subsequent patches will add to this, but to avoid conflicts, set up the basics separately. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5700aa130186e0b5d600806645b051bfd9067f09 Modified Files -- src/bin/pg_rese