pgsql: Remove hard-coded schema knowledge about pg_attribute from genbk

2018-01-12 Thread Alvaro Herrera
Remove hard-coded schema knowledge about pg_attribute from genbki.pl Add the ability to label a column's default value in the catalog header, and implement this for pg_attribute. A new function in Catalog.pm is used to fill in a tuple with defaults. The build process will complain loudly if a ca

pgsql: Fix parsing of compatibility mode argument.

2018-01-12 Thread Michael Meskes
Fix parsing of compatibility mode argument. Patch by Ashutosh Sharma Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ca4587f3f94f5c33da6543535f666a9f20f3ef33 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 4 ++-- 1 file changed, 2 insertions(+),

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Fix postgres_fdw to cope with duplicate GROUP BY entries.

2018-01-12 Thread Tom Lane
Fix postgres_fdw to cope with duplicate GROUP BY entries. Commit 7012b132d, which added the ability to push down aggregates and grouping to the remote server, wasn't careful to ensure that the remote server would have the same idea we do about which columns are the grouping columns, in cases where

pgsql: Fix postgres_fdw to cope with duplicate GROUP BY entries.

2018-01-12 Thread Tom Lane
Fix postgres_fdw to cope with duplicate GROUP BY entries. Commit 7012b132d, which added the ability to push down aggregates and grouping to the remote server, wasn't careful to ensure that the remote server would have the same idea we do about which columns are the grouping columns, in cases where

pgsql: docs: replace dblink() mention with foreign data mention

2018-01-12 Thread Bruce Momjian
docs: replace dblink() mention with foreign data mention Reported-by: steven.winfi...@cantabcapital.com Discussion: https://postgr.es/m/20171031105039.17183@wrigleys.postgresql.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/255f14183ac7bc6a83a5bb00d67d5ac