[COMMITTERS] pgsql: Fix buffer overflow on particularly named files and clarify docu

2016-12-21 Thread Michael Meskes
Fix buffer overflow on particularly named files and clarify documentation about output file naming. Patch by Tsunakawa, Takayuki Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/commitdiff/501c9107487d33e234f4af8bf77f2aa64c05e6d3 Modified Files -- doc/src/sg

[COMMITTERS] pgsql: Fix buffer overflow on particularly named files and clarify docu

2016-12-21 Thread Michael Meskes
Fix buffer overflow on particularly named files and clarify documentation about output file naming. Patch by Tsunakawa, Takayuki Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/commitdiff/3af172f7b68763fbbf720d11be88784f21c4c1d1 Modified Files -- doc/src/sg

[COMMITTERS] pgsql: Fix buffer overflow on particularly named files and clarify docu

2016-12-21 Thread Michael Meskes
Fix buffer overflow on particularly named files and clarify documentation about output file naming. Patch by Tsunakawa, Takayuki Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/1df8b3fe820d4d589f6a38ea0d0c9e5714651509 Modified Files -- doc/src/sg

[COMMITTERS] pgsql: Fix buffer overflow on particularly named files and clarify docu

2016-12-21 Thread Michael Meskes
Fix buffer overflow on particularly named files and clarify documentation about output file naming. Patch by Tsunakawa, Takayuki Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/4032ef18d06aa7a3db515926ddebe8af04e533fe Modified Files -- doc/src/sgml/ref/

[COMMITTERS] pgsql: Fix buffer overflow on particularly named files and clarify docu

2016-12-21 Thread Michael Meskes
Fix buffer overflow on particularly named files and clarify documentation about output file naming. Patch by Tsunakawa, Takayuki Branch -- REL9_6_STABLE Details --- http://git.postgresql.org/pg/commitdiff/fd2a5547c523768b662cd2ea056080ad16c9f23f Modified Files -- doc/src/sg

[COMMITTERS] pgsql: Fix buffer overflow on particularly named files and clarify docu

2016-12-21 Thread Michael Meskes
Fix buffer overflow on particularly named files and clarify documentation about output file naming. Patch by Tsunakawa, Takayuki Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/a88c547f926c1bd70d7dc180826e7e95824c88d1 Modified Files -- doc/src/sg

[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it When dblink or postgres_fdw detects an error on the remote side of the connection, it will try to construct a local error message as best it can using libpq's PQresultErrorField(). When no primary message is available, it was bailing out

[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it When dblink or postgres_fdw detects an error on the remote side of the connection, it will try to construct a local error message as best it can using libpq's PQresultErrorField(). When no primary message is available, it was bailing out

[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it When dblink or postgres_fdw detects an error on the remote side of the connection, it will try to construct a local error message as best it can using libpq's PQresultErrorField(). When no primary message is available, it was bailing out

[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it When dblink or postgres_fdw detects an error on the remote side of the connection, it will try to construct a local error message as best it can using libpq's PQresultErrorField(). When no primary message is available, it was bailing out

[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it When dblink or postgres_fdw detects an error on the remote side of the connection, it will try to construct a local error message as best it can using libpq's PQresultErrorField(). When no primary message is available, it was bailing out

[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it When dblink or postgres_fdw detects an error on the remote side of the connection, it will try to construct a local error message as best it can using libpq's PQresultErrorField(). When no primary message is available, it was bailing out

[COMMITTERS] pgsql: Fix detection of unfinished Unicode surrogate pair at end of str

2016-12-21 Thread Tom Lane
Fix detection of unfinished Unicode surrogate pair at end of string. The U&'...' and U&"..." syntaxes silently discarded a surrogate pair start (that is, a code between U+D800 and U+DBFF) if it occurred at the very end of the string. This seems like an obvious oversight, since we throw an error f

[COMMITTERS] pgsql: Fix detection of unfinished Unicode surrogate pair at end of str

2016-12-21 Thread Tom Lane
Fix detection of unfinished Unicode surrogate pair at end of string. The U&'...' and U&"..." syntaxes silently discarded a surrogate pair start (that is, a code between U+D800 and U+DBFF) if it occurred at the very end of the string. This seems like an obvious oversight, since we throw an error f

[COMMITTERS] pgsql: Fix detection of unfinished Unicode surrogate pair at end of str

2016-12-21 Thread Tom Lane
Fix detection of unfinished Unicode surrogate pair at end of string. The U&'...' and U&"..." syntaxes silently discarded a surrogate pair start (that is, a code between U+D800 and U+DBFF) if it occurred at the very end of the string. This seems like an obvious oversight, since we throw an error f

[COMMITTERS] pgsql: Fix detection of unfinished Unicode surrogate pair at end of str

2016-12-21 Thread Tom Lane
Fix detection of unfinished Unicode surrogate pair at end of string. The U&'...' and U&"..." syntaxes silently discarded a surrogate pair start (that is, a code between U+D800 and U+DBFF) if it occurred at the very end of the string. This seems like an obvious oversight, since we throw an error f

[COMMITTERS] pgsql: Fix detection of unfinished Unicode surrogate pair at end of str

2016-12-21 Thread Tom Lane
Fix detection of unfinished Unicode surrogate pair at end of string. The U&'...' and U&"..." syntaxes silently discarded a surrogate pair start (that is, a code between U+D800 and U+DBFF) if it occurred at the very end of the string. This seems like an obvious oversight, since we throw an error f

[COMMITTERS] pgsql: Fix detection of unfinished Unicode surrogate pair at end of str

2016-12-21 Thread Tom Lane
Fix detection of unfinished Unicode surrogate pair at end of string. The U&'...' and U&"..." syntaxes silently discarded a surrogate pair start (that is, a code between U+D800 and U+DBFF) if it occurred at the very end of the string. This seems like an obvious oversight, since we throw an error f

Re: [COMMITTERS] pgsql: Fix base backup rate limiting in presence of slow i/o

2016-12-21 Thread Magnus Hagander
On Wed, Dec 21, 2016 at 6:55 PM, Dean Rasheed wrote: > On 19 December 2016 at 09:17, Magnus Hagander wrote: > > Fix base backup rate limiting in presence of slow i/o > > > > Branch > > -- > > REL9_4_STABLE > > I'm seeing a warning on the 9.4 branch that looks to have been caused > by this co

[COMMITTERS] pgsql: Fix strange behavior (and possible crashes) in full text phrase

2016-12-21 Thread Tom Lane
Fix strange behavior (and possible crashes) in full text phrase search. In an attempt to simplify the tsquery matching engine, the original phrase search patch invented rewrite rules that would rearrange a tsquery so that no AND/OR/NOT operator appeared below a PHRASE operator. But this approach h

[COMMITTERS] pgsql: Fix strange behavior (and possible crashes) in full text phrase

2016-12-21 Thread Tom Lane
Fix strange behavior (and possible crashes) in full text phrase search. In an attempt to simplify the tsquery matching engine, the original phrase search patch invented rewrite rules that would rearrange a tsquery so that no AND/OR/NOT operator appeared below a PHRASE operator. But this approach h

[COMMITTERS] pgsql: Improve ALTER TABLE documentation

2016-12-21 Thread Stephen Frost
Improve ALTER TABLE documentation The ALTER TABLE documentation wasn't terribly clear when it came to which commands could be combined together and what it meant when they were. In particular, SET TABLESPACE *can* be combined with other commands, when it's operating against a single table, but no

[COMMITTERS] pgsql: Improve ALTER TABLE documentation

2016-12-21 Thread Stephen Frost
Improve ALTER TABLE documentation The ALTER TABLE documentation wasn't terribly clear when it came to which commands could be combined together and what it meant when they were. In particular, SET TABLESPACE *can* be combined with other commands, when it's operating against a single table, but no

[COMMITTERS] pgsql: Improve ALTER TABLE documentation

2016-12-21 Thread Stephen Frost
Improve ALTER TABLE documentation The ALTER TABLE documentation wasn't terribly clear when it came to which commands could be combined together and what it meant when they were. In particular, SET TABLESPACE *can* be combined with other commands, when it's operating against a single table, but no

[COMMITTERS] pgsql: Improve ALTER TABLE documentation

2016-12-21 Thread Stephen Frost
Improve ALTER TABLE documentation The ALTER TABLE documentation wasn't terribly clear when it came to which commands could be combined together and what it meant when they were. In particular, SET TABLESPACE *can* be combined with other commands, when it's operating against a single table, but no

[COMMITTERS] pgsql: For 8.0 servers, get last built-in oid from pg_database

2016-12-21 Thread Stephen Frost
For 8.0 servers, get last built-in oid from pg_database We didn't start ensuring that all built-in objects had OIDs less than 16384 until 8.1, so for 8.0 servers we still need to query the value out of pg_database. We need this, in particular, to distinguish which casts were built-in and which we

[COMMITTERS] pgsql: Fix dumping of casts and transforms using built-in functions

2016-12-21 Thread Stephen Frost
Fix dumping of casts and transforms using built-in functions In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the cast or transform if it happened to use a built-in function because we weren't including the information about built-in functions when querying pg_proc from getFunc

[COMMITTERS] pgsql: For 8.0 servers, get last built-in oid from pg_database

2016-12-21 Thread Stephen Frost
For 8.0 servers, get last built-in oid from pg_database We didn't start ensuring that all built-in objects had OIDs less than 16384 until 8.1, so for 8.0 servers we still need to query the value out of pg_database. We need this, in particular, to distinguish which casts were built-in and which we

[COMMITTERS] pgsql: For 8.0 servers, get last built-in oid from pg_database

2016-12-21 Thread Stephen Frost
For 8.0 servers, get last built-in oid from pg_database We didn't start ensuring that all built-in objects had OIDs less than 16384 until 8.1, so for 8.0 servers we still need to query the value out of pg_database. We need this, in particular, to distinguish which casts were built-in and which we

[COMMITTERS] pgsql: For 8.0 servers, get last built-in oid from pg_database

2016-12-21 Thread Stephen Frost
For 8.0 servers, get last built-in oid from pg_database We didn't start ensuring that all built-in objects had OIDs less than 16384 until 8.1, so for 8.0 servers we still need to query the value out of pg_database. We need this, in particular, to distinguish which casts were built-in and which we

[COMMITTERS] pgsql: Fix dumping of casts and transforms using built-in functions

2016-12-21 Thread Stephen Frost
Fix dumping of casts and transforms using built-in functions In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the cast or transform if it happened to use a built-in function because we weren't including the information about built-in functions when querying pg_proc from getFunc

[COMMITTERS] pgsql: Fix dumping of casts and transforms using built-in functions

2016-12-21 Thread Stephen Frost
Fix dumping of casts and transforms using built-in functions In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the cast or transform if it happened to use a built-in function because we weren't including the information about built-in functions when querying pg_proc from getFunc

[COMMITTERS] pgsql: For 8.0 servers, get last built-in oid from pg_database

2016-12-21 Thread Stephen Frost
For 8.0 servers, get last built-in oid from pg_database We didn't start ensuring that all built-in objects had OIDs less than 16384 until 8.1, so for 8.0 servers we still need to query the value out of pg_database. We need this, in particular, to distinguish which casts were built-in and which we

[COMMITTERS] pgsql: Fix dumping of casts and transforms using built-in functions

2016-12-21 Thread Stephen Frost
Fix dumping of casts and transforms using built-in functions In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the cast or transform if it happened to use a built-in function because we weren't including the information about built-in functions when querying pg_proc from getFunc

[COMMITTERS] pgsql: Fix dumping of casts and transforms using built-in functions

2016-12-21 Thread Stephen Frost
Fix dumping of casts and transforms using built-in functions In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the cast or transform if it happened to use a built-in function because we weren't including the information about built-in functions when querying pg_proc from getFunc

[COMMITTERS] pgsql: For 8.0 servers, get last built-in oid from pg_database

2016-12-21 Thread Stephen Frost
For 8.0 servers, get last built-in oid from pg_database We didn't start ensuring that all built-in objects had OIDs less than 16384 until 8.1, so for 8.0 servers we still need to query the value out of pg_database. We need this, in particular, to distinguish which casts were built-in and which we

[COMMITTERS] pgsql: Fix dumping of casts and transforms using built-in functions

2016-12-21 Thread Stephen Frost
Fix dumping of casts and transforms using built-in functions In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the cast or transform if it happened to use a built-in function because we weren't including the information about built-in functions when querying pg_proc from getFunc

Re: [COMMITTERS] pgsql: Fix base backup rate limiting in presence of slow i/o

2016-12-21 Thread Dean Rasheed
On 19 December 2016 at 09:17, Magnus Hagander wrote: > Fix base backup rate limiting in presence of slow i/o > > Branch > -- > REL9_4_STABLE I'm seeing a warning on the 9.4 branch that looks to have been caused by this commit: basebackup.c: In function ‘throttle’: basebackup.c:1284:8: warnin

[COMMITTERS] pgsql: Fix order of operations in CREATE OR REPLACE VIEW.

2016-12-21 Thread Dean Rasheed
Fix order of operations in CREATE OR REPLACE VIEW. When CREATE OR REPLACE VIEW acts on an existing view, don't update the view options until after the view query has been updated. This is necessary in the case where CREATE OR REPLACE VIEW is used on an existing view that is not updatable, and the

[COMMITTERS] pgsql: Fix order of operations in CREATE OR REPLACE VIEW.

2016-12-21 Thread Dean Rasheed
Fix order of operations in CREATE OR REPLACE VIEW. When CREATE OR REPLACE VIEW acts on an existing view, don't update the view options until after the view query has been updated. This is necessary in the case where CREATE OR REPLACE VIEW is used on an existing view that is not updatable, and the

[COMMITTERS] pgsql: Fix order of operations in CREATE OR REPLACE VIEW.

2016-12-21 Thread Dean Rasheed
Fix order of operations in CREATE OR REPLACE VIEW. When CREATE OR REPLACE VIEW acts on an existing view, don't update the view options until after the view query has been updated. This is necessary in the case where CREATE OR REPLACE VIEW is used on an existing view that is not updatable, and the

[COMMITTERS] pgsql: Fix order of operations in CREATE OR REPLACE VIEW.

2016-12-21 Thread Dean Rasheed
Fix order of operations in CREATE OR REPLACE VIEW. When CREATE OR REPLACE VIEW acts on an existing view, don't update the view options until after the view query has been updated. This is necessary in the case where CREATE OR REPLACE VIEW is used on an existing view that is not updatable, and the

[COMMITTERS] pgsql: Convert elog() to ereport() and do some wordsmithing.

2016-12-21 Thread Robert Haas
Convert elog() to ereport() and do some wordsmithing. It's not entirely clear that we should log a message here at all, but it's certainly wrong to use elog() for a message that should clearly be translatable. Amit Langote Branch -- master Details --- http://git.postgresql.org/pg/commit

[COMMITTERS] pgsql: Refactor partition tuple routing code to reduce duplication.

2016-12-21 Thread Robert Haas
Refactor partition tuple routing code to reduce duplication. Amit Langote Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/1fc5c4945047e8e8c7aa1644b52dd0187b729181 Modified Files -- src/backend/commands/copy.c| 72 ++ sr

[COMMITTERS] pgsql: Fix corner-case bug in WaitEventSetWaitBlock on Windows.

2016-12-21 Thread Robert Haas
Fix corner-case bug in WaitEventSetWaitBlock on Windows. If we do not reset the FD_READ event, WaitForMultipleObjects won't return it again again unless we've meanwhile read from the socket, which is generally true but not guaranteed. WaitEventSetWaitBlock itself may fail to return the event to t

[COMMITTERS] pgsql: Fix corner-case bug in WaitEventSetWaitBlock on Windows.

2016-12-21 Thread Robert Haas
Fix corner-case bug in WaitEventSetWaitBlock on Windows. If we do not reset the FD_READ event, WaitForMultipleObjects won't return it again again unless we've meanwhile read from the socket, which is generally true but not guaranteed. WaitEventSetWaitBlock itself may fail to return the event to t

[COMMITTERS] pgsql: Refactor merge path generation code.

2016-12-21 Thread Robert Haas
Refactor merge path generation code. This shouldn't change the set of paths that get generated in any way, but it is preparatory work for further changes to allow a partial path to be merge-joined witih a non-partial path to produce a partial join path. Dilip Kumar, with cosmetic adjustments by m

[COMMITTERS] pgsql: Reorder pg_sequence columns to avoid alignment issue

2016-12-21 Thread Peter Eisentraut
Reorder pg_sequence columns to avoid alignment issue On AIX, doubles are aligned at 4 bytes, but int64 is aligned at 8 bytes. Our code assumes that doubles have alignment that can also be applied to int64, but that fails in this case. One effect is that heap_form_tuple() writes tuples in a differ

[COMMITTERS] pgsql: Forbid invalid combination of options in pg_basebackup.

2016-12-21 Thread Fujii Masao
Forbid invalid combination of options in pg_basebackup. Commit 56c7d8d4552180fd66fe48423bb2a9bb767c2d87 allowed pg_basebackup to stream WAL in tar mode. But there is the restriction that WAL streaming in tar mode works only when the value - (dash) is not specified as output directory. This means t