[COMMITTERS] pgsql: MSVC: Finish clean.bat build artifact coverage.

2017-07-24 Thread Noah Misch
MSVC: Finish clean.bat build artifact coverage. With this, "git clean -dnx" is clear after a "clean dist" following a build. Preserve sql_help.h in non-dist cleans, like the Makefile does. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bbbd9121e63f9f7cf8cc86025d5d

[COMMITTERS] pgsql: Be more consistent about errors for opfamily member lookup failu

2017-07-24 Thread Tom Lane
Be more consistent about errors for opfamily member lookup failures. Add error checks in some places that were calling get_opfamily_member or get_opfamily_proc and just assuming that the call could never fail. Also, standardize the wording for such errors in some other places. None of these error

[COMMITTERS] pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s

2017-07-24 Thread Tom Lane
Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s. Various cases involving renaming of view columns are handled by having make_viewdef pass down the view's current relation tupledesc to get_query_def, which then takes care to use the column names from the tupledesc for the output co

[COMMITTERS] pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s

2017-07-24 Thread Tom Lane
Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s. Various cases involving renaming of view columns are handled by having make_viewdef pass down the view's current relation tupledesc to get_query_def, which then takes care to use the column names from the tupledesc for the output co

[COMMITTERS] pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s

2017-07-24 Thread Tom Lane
Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s. Various cases involving renaming of view columns are handled by having make_viewdef pass down the view's current relation tupledesc to get_query_def, which then takes care to use the column names from the tupledesc for the output co

[COMMITTERS] pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s

2017-07-24 Thread Tom Lane
Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s. Various cases involving renaming of view columns are handled by having make_viewdef pass down the view's current relation tupledesc to get_query_def, which then takes care to use the column names from the tupledesc for the output co

[COMMITTERS] pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s

2017-07-24 Thread Tom Lane
Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s. Various cases involving renaming of view columns are handled by having make_viewdef pass down the view's current relation tupledesc to get_query_def, which then takes care to use the column names from the tupledesc for the output co

[COMMITTERS] pgsql: Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s

2017-07-24 Thread Tom Lane
Ensure that pg_get_ruledef()'s output matches pg_get_viewdef()'s. Various cases involving renaming of view columns are handled by having make_viewdef pass down the view's current relation tupledesc to get_query_def, which then takes care to use the column names from the tupledesc for the output co

[COMMITTERS] pgsql: When WCOs are present, disable direct foreign table modification

2017-07-24 Thread Robert Haas
When WCOs are present, disable direct foreign table modification. If the user modifies a view that has CHECK OPTIONs and this gets translated into a modification to an underlying relation which happens to be a foreign table, the check options should be enforced. In the normal code path, that was

[COMMITTERS] pgsql: When WCOs are present, disable direct foreign table modification

2017-07-24 Thread Robert Haas
When WCOs are present, disable direct foreign table modification. If the user modifies a view that has CHECK OPTIONs and this gets translated into a modification to an underlying relation which happens to be a foreign table, the check options should be enforced. In the normal code path, that was

[COMMITTERS] pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b

2017-07-24 Thread Tom Lane
Fix race condition in predicate-lock init code in EXEC_BACKEND builds. Trading a little too heavily on letting the code path be the same whether we were creating shared data structures or only attaching to them, InitPredicateLocks() inserted the "scratch" PredicateLockTargetHash entry unconditiona

[COMMITTERS] pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b

2017-07-24 Thread Tom Lane
Fix race condition in predicate-lock init code in EXEC_BACKEND builds. Trading a little too heavily on letting the code path be the same whether we were creating shared data structures or only attaching to them, InitPredicateLocks() inserted the "scratch" PredicateLockTargetHash entry unconditiona

[COMMITTERS] pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b

2017-07-24 Thread Tom Lane
Fix race condition in predicate-lock init code in EXEC_BACKEND builds. Trading a little too heavily on letting the code path be the same whether we were creating shared data structures or only attaching to them, InitPredicateLocks() inserted the "scratch" PredicateLockTargetHash entry unconditiona

[COMMITTERS] pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b

2017-07-24 Thread Tom Lane
Fix race condition in predicate-lock init code in EXEC_BACKEND builds. Trading a little too heavily on letting the code path be the same whether we were creating shared data structures or only attaching to them, InitPredicateLocks() inserted the "scratch" PredicateLockTargetHash entry unconditiona

[COMMITTERS] pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b

2017-07-24 Thread Tom Lane
Fix race condition in predicate-lock init code in EXEC_BACKEND builds. Trading a little too heavily on letting the code path be the same whether we were creating shared data structures or only attaching to them, InitPredicateLocks() inserted the "scratch" PredicateLockTargetHash entry unconditiona

[COMMITTERS] pgsql: Fix race condition in predicate-lock init code in EXEC_BACKEND b

2017-07-24 Thread Tom Lane
Fix race condition in predicate-lock init code in EXEC_BACKEND builds. Trading a little too heavily on letting the code path be the same whether we were creating shared data structures or only attaching to them, InitPredicateLocks() inserted the "scratch" PredicateLockTargetHash entry unconditiona

[COMMITTERS] pgsql: Fix partitioning crashes during error reporting.

2017-07-24 Thread Robert Haas
Fix partitioning crashes during error reporting. In various places where we reverse-map a tuple before calling ExecBuildSlotValueDescription, we neglected to ensure that the slot descriptor matched the tuple stored in it. Amit Langote and Amit Khandekar, reviewed by Etsuro Fujita Discussion: ht