[COMMITTERS] pgsql: Add a GetForeignUpperPaths callback function for FDWs.

2016-03-14 Thread Tom Lane
Add a GetForeignUpperPaths callback function for FDWs. This is basically like the just-added create_upper_paths_hook, but control is funneled only to the FDW responsible for all the baserels of the current query; so providing such a callback is much less likely to add useless overhead than using t

[COMMITTERS] pgsql: Add missing include for self-containment

2016-03-14 Thread Peter Eisentraut
Add missing include for self-containment Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/be6de4c1215a8ad5607b1fcc7e9e6da1de780877 Modified Files -- src/include/common/controldata_utils.h | 2 ++ 1 file changed, 2 insertions(+) -- Sent via pgsql-committe

[COMMITTERS] pgsql: Fix EXPLAIN ANALYZE SELECT INTO not to choose a parallel plan.

2016-03-14 Thread Robert Haas
Fix EXPLAIN ANALYZE SELECT INTO not to choose a parallel plan. We don't support any parallel write operations at present, so choosing a parallel plan causes us to error out. Also, add a new regression test that uses EXPLAIN ANALYZE SELECT INTO; if we'd had this previously, force_parallel_mode tes

[COMMITTERS] pgsql: Provide a planner hook at a suitable place for creating upper-re

2016-03-14 Thread Tom Lane
Provide a planner hook at a suitable place for creating upper-rel Paths. In the initial revision of the upper-planner pathification work, the only available way for an FDW or custom-scan provider to inject Paths representing post-scan-join processing was to insert them during scan-level GetForeign

[COMMITTERS] pgsql: Allow callers of create_foreignscan_path to specify nondefault P

2016-03-14 Thread Tom Lane
Allow callers of create_foreignscan_path to specify nondefault PathTarget. Although the default choice of rel->reltarget should typically be sufficient for scan or join paths, it's not at all sufficient for the purposes PathTargets were invented for; in particular not for upper-relation Paths. So

[COMMITTERS] pgsql: Rethink representation of PathTargets.

2016-03-14 Thread Tom Lane
Rethink representation of PathTargets. In commit 19a541143a09c067 I did not make PathTarget a subtype of Node, and embedded a RelOptInfo's reltarget directly into it rather than having a separately-allocated Node. In hindsight that was misguided micro-optimization, enabled by the fact that at tha

[COMMITTERS] pgsql: Update PL/Perl's comment about hv_store().

2016-03-14 Thread Tom Lane
Update PL/Perl's comment about hv_store(). Negative klen is documented since Perl 5.16, and 5.6 is no longer supported so no need to comment about it. Dagfinn Ilmari Mannsåker Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/07341a2980a37ccbb3a51af2bd2f3c87953d8ea4

[COMMITTERS] pgsql: Improve conversions from uint64 to Perl types.

2016-03-14 Thread Tom Lane
Improve conversions from uint64 to Perl types. Perl's integers are pointer-sized, so can hold more than INT_MAX on LP64 platforms, and come in both signed (IV) and unsigned (UV). Floating point values (NV) may also be larger than double. Since Perl 5.19.4 array indices are SSize_t instead of I32

[COMMITTERS] pgsql: Update more comments for 96198d94cb7adc664bda341842dc8db671d8be7

2016-03-14 Thread Robert Haas
Update more comments for 96198d94cb7adc664bda341842dc8db671d8be72. Etsuro Fujita, reviewed (though not completely endorsed) by Ashutosh Bapat, and slightly expanded by me. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/6be84eeb8d5a72014b1b6e44d0646f69531a1ccf Modif

[COMMITTERS] pgsql: Use repalloc_huge() to enlarge a SPITupleTable's tuple pointer a

2016-03-14 Thread Tom Lane
Use repalloc_huge() to enlarge a SPITupleTable's tuple pointer array. Commit 23a27b039d94ba35 widened the rows-stored counters to uint64, but that's academic unless we allow the tuple pointer array to exceed 1GB. (It might be a good idea to provide some other limit on how much storage a SPITupleT

[COMMITTERS] pgsql: Improve check for overly-long extensible node name.

2016-03-14 Thread Robert Haas
Improve check for overly-long extensible node name. The old code is bad for two reasons. First, it has an off-by-one error. Second, it won't help if you aren't running with assertions enabled. Per discussion, we want a check here in that case too. Author: KaiGai Kohei, adjusted by me. Reviewed

[COMMITTERS] pgsql: pg_stat_get_progress_info() should be marked STRICT.

2016-03-14 Thread Tom Lane
pg_stat_get_progress_info() should be marked STRICT. I didn't bother with a catversion bump. Report and patch by Thomas Munro Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/2da75499879032d8d2f233ca42cc2efe48fd76ef Modified Files -- src/include/catalog/

[COMMITTERS] pgsql: Add missing NULL terminator to list_SECURITY_LABEL_preposition[]

2016-03-14 Thread Tom Lane
Add missing NULL terminator to list_SECURITY_LABEL_preposition[]. On the machines I tried this on, pressing TAB after SECURITY LABEL led to being offered ON and FOR as intended, plus random other keywords (varying across machines). But if you were a bit more unlucky you'd get a crash, as reported

[COMMITTERS] pgsql: Add missing NULL terminator to list_SECURITY_LABEL_preposition[]

2016-03-14 Thread Tom Lane
Add missing NULL terminator to list_SECURITY_LABEL_preposition[]. On the machines I tried this on, pressing TAB after SECURITY LABEL led to being offered ON and FOR as intended, plus random other keywords (varying across machines). But if you were a bit more unlucky you'd get a crash, as reported

[COMMITTERS] pgsql: Add missing NULL terminator to list_SECURITY_LABEL_preposition[]

2016-03-14 Thread Tom Lane
Add missing NULL terminator to list_SECURITY_LABEL_preposition[]. On the machines I tried this on, pressing TAB after SECURITY LABEL led to being offered ON and FOR as intended, plus random other keywords (varying across machines). But if you were a bit more unlucky you'd get a crash, as reported

[COMMITTERS] pgsql: Add missing NULL terminator to list_SECURITY_LABEL_preposition[]

2016-03-14 Thread Tom Lane
Add missing NULL terminator to list_SECURITY_LABEL_preposition[]. On the machines I tried this on, pressing TAB after SECURITY LABEL led to being offered ON and FOR as intended, plus random other keywords (varying across machines). But if you were a bit more unlucky you'd get a crash, as reported

[COMMITTERS] pgsql: Add missing NULL terminator to list_SECURITY_LABEL_preposition[]

2016-03-14 Thread Tom Lane
Add missing NULL terminator to list_SECURITY_LABEL_preposition[]. On the machines I tried this on, pressing TAB after SECURITY LABEL led to being offered ON and FOR as intended, plus random other keywords (varying across machines). But if you were a bit more unlucky you'd get a crash, as reported

[COMMITTERS] pgsql: Teach the configure script to validate its --with-pgport argumen

2016-03-14 Thread Tom Lane
Teach the configure script to validate its --with-pgport argument. Previously, configure would take any string, including an empty string, leading to obscure compile failures in guc.c. It seems worth expending a few lines of code to ensure that the argument is a decimal number between 1 and 65535