[COMMITTERS] pgsql: Consistency improvements for slot and decoding code.

2014-06-12 Thread Andres Freund
Consistency improvements for slot and decoding code. Change the order of checks in similar functions to be the same; remove a parameter that's not needed anymore; rename a memory context and expand a couple of comments. Per review comments from Amit Kapila Branch -- REL9_4_STABLE Details --

[COMMITTERS] pgsql: Consistency improvements for slot and decoding code.

2014-06-12 Thread Andres Freund
Consistency improvements for slot and decoding code. Change the order of checks in similar functions to be the same; remove a parameter that's not needed anymore; rename a memory context and expand a couple of comments. Per review comments from Amit Kapila Branch -- master Details --- h

[COMMITTERS] pgsql: Remove unnecessary output expressions from unflattened subquerie

2014-06-12 Thread Tom Lane
Remove unnecessary output expressions from unflattened subqueries. If a sub-select-in-FROM gets flattened into the upper query, then we naturally get rid of any output columns that are defined in the sub-select text but not actually used in the upper query. However, this doesn't happen when it's

[COMMITTERS] pgsql: Fix typos

2014-06-12 Thread Alvaro Herrera
Fix typos Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/7937910781a823382b3f76b4b811791804431927 Modified Files -- src/backend/commands/event_trigger.c |2 +- src/backend/utils/adt/json.c |2 +- 2 files changed, 2 insertions(+), 2 deletion

[COMMITTERS] pgsql: Rename lo_create(oid, bytea) to lo_from_bytea().

2014-06-12 Thread Tom Lane
Rename lo_create(oid, bytea) to lo_from_bytea(). The previous naming broke the query that libpq's lo_initialize() uses to collect the OIDs of the server-side functions it requires, because that query effectively assumes that there is only one function named lo_create in the pg_catalog schema (and

[COMMITTERS] pgsql: Rename lo_create(oid, bytea) to lo_from_bytea().

2014-06-12 Thread Tom Lane
Rename lo_create(oid, bytea) to lo_from_bytea(). The previous naming broke the query that libpq's lo_initialize() uses to collect the OIDs of the server-side functions it requires, because that query effectively assumes that there is only one function named lo_create in the pg_catalog schema (and

[COMMITTERS] pgsql: Add regression test to prevent future breakage of legacy query i

2014-06-12 Thread Tom Lane
Add regression test to prevent future breakage of legacy query in libpq. Memorialize the expected output of the query that libpq has been using for many years to get the OIDs of large-object support functions. Although we really ought to change the way libpq does this, we must expect that this qu

[COMMITTERS] pgsql: Add regression test to prevent future breakage of legacy query i

2014-06-12 Thread Tom Lane
Add regression test to prevent future breakage of legacy query in libpq. Memorialize the expected output of the query that libpq has been using for many years to get the OIDs of large-object support functions. Although we really ought to change the way libpq does this, we must expect that this qu

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- master

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- REL9_3_

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- REL9_1_

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- REL9_2_

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- REL8_4_

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- REL9_0_

[COMMITTERS] pgsql: Remove inadvertent copyright violation in largeobject regression

2014-06-12 Thread Tom Lane
Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. Branch -- REL9_4_

[COMMITTERS] pgsql: Preserve exposed type of subquery outputs when substituting NULL

2014-06-12 Thread Tom Lane
Preserve exposed type of subquery outputs when substituting NULLs. I thought I could get away with hardcoded int4 here, but the buildfarm says differently. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/9da6fc011b7e2ca16386cf9f1c9f25c114e5 Modified Files --

[COMMITTERS] pgsql: Adjust largeobject regression test to leave a couple of LOs behi

2014-06-12 Thread Tom Lane
Adjust largeobject regression test to leave a couple of LOs behind. Since we commonly test pg_dump/pg_restore by seeing whether they can dump and restore the regression test database, it behooves us to include some large objects in that test scenario. I tried to include a comment on one of these

[COMMITTERS] pgsql: Adjust largeobject regression test to leave a couple of LOs behi

2014-06-12 Thread Tom Lane
Adjust largeobject regression test to leave a couple of LOs behind. Since we commonly test pg_dump/pg_restore by seeing whether they can dump and restore the regression test database, it behooves us to include some large objects in that test scenario. I tried to include a comment on one of these

[COMMITTERS] pgsql: Improve tuplestore's error messages for I/O failures.

2014-06-12 Thread Tom Lane
Improve tuplestore's error messages for I/O failures. We should report the errno when we get a failure from functions like BufFileWrite. "ERROR: write failed" is unreasonably taciturn for a case that's well within the realm of possibility; I've seen it a couple times in the buildfarm recently, in

[COMMITTERS] pgsql: Improve tuplestore's error messages for I/O failures.

2014-06-12 Thread Tom Lane
Improve tuplestore's error messages for I/O failures. We should report the errno when we get a failure from functions like BufFileWrite. "ERROR: write failed" is unreasonably taciturn for a case that's well within the realm of possibility; I've seen it a couple times in the buildfarm recently, in

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data.

2014-06-12 Thread Tom Lane
Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferlo

[COMMITTERS] pgsql: Improve predtest.c's ability to reason about operator expression

2014-06-12 Thread Tom Lane
Improve predtest.c's ability to reason about operator expressions. We have for a long time been able to prove implications and refutations between clauses structured like "expr op const" with the same subexpression and btree-related operators; for example that "x < 4" implies "x <= 5". The implica