pgsql: Support adding partitioned tables to publication

2020-03-10 Thread Peter Eisentraut
Support adding partitioned tables to publication When a partitioned table is added to a publication, changes of all of its partitions (current or future) are published via that publication. This change only affects which tables a publication considers as its members. The receiving side still see

pgsql: Remove utils/acl.h from catalog/objectaddress.h

2020-03-10 Thread Peter Eisentraut
Remove utils/acl.h from catalog/objectaddress.h The need for this was removed by 8b9e9644dc6a9bd4b7a97950e6212f63880cf18b. A number of files now need to include utils/acl.h or parser/parse_node.h explicitly where they previously got it indirectly somehow. Since parser/parse_node.h already includ

pgsql: Remove win32ver.rc from version_stamp.pl

2020-03-10 Thread Peter Eisentraut
Remove win32ver.rc from version_stamp.pl This removes another relic from the old nmake-based Windows build. version_stamp.pl put version number information into win32ver.rc. But win32ver.rc already gets other version number information from the preprocessor at build time, so it would make more se

Re: pgsql: Remove win32ver.rc from version_stamp.pl

2020-03-10 Thread Peter Eisentraut
On 2020-03-10 11:22, Peter Eisentraut wrote: What we need for this is having the major version number and the minor version number as separate integer symbols. Both configure and Solution.pm already have that logic, because they compute PG_VERSION_NUM. So we just keep all the logic there now.

Re: pgsql: Remove win32ver.rc from version_stamp.pl

2020-03-10 Thread Tom Lane
Peter Eisentraut writes: > This created some seemingly unrelated build farm failures. I suspect > this must have something to do with the new shell code in configure > +PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'` > +test -n "$PG_MINORVERSION" || PG_MINORVERSION=0 > ending

Re: pgsql: Remove win32ver.rc from version_stamp.pl

2020-03-10 Thread Tom Lane
I wrote: > I'd suggest reverting the change in how PG_VERSION_NUM is computed > in configure.in --- that was certainly not necessary to the patch, > and evidently you're falling foul of some weird behavior around > nesting double-quotes and backquotes. Actually, you can just get rid of the nesting

pgsql: Split out CreateCast into src/backend/catalog/pg_cast.c

2020-03-10 Thread Alvaro Herrera
Split out CreateCast into src/backend/catalog/pg_cast.c This catalog-handling code was previously together with the rest of CastCreate() in src/backend/commands/functioncmds.c. A future patch will need a way to add casts internally, so this will be useful to have separate. Also, move the nearby

pgsql: Preserve integer and float values accurately in (de)serialize_de

2020-03-10 Thread Tom Lane
Preserve integer and float values accurately in (de)serialize_deflist. Previously, this code just smashed all types of DefElem values to strings, cavalierly reasoning that nobody would care. But in point of fact, most of the defGetFoo functions do distinguish among different input syntaxes; for i

pgsql: Avoid portability problem introduced in 0a42a2e9c.

2020-03-10 Thread Tom Lane
Avoid portability problem introduced in 0a42a2e9c. Apparently not all shells handle nested quotes quite the same. But we don't need the inner double quotes in this case, so just drop them. Discussion: https://postgr.es/m/[email protected] Branch -- master

pgsql: Ensure that CREATE TABLE LIKE copies any NO INHERIT constraint p

2020-03-10 Thread Tom Lane
Ensure that CREATE TABLE LIKE copies any NO INHERIT constraint property. Since the documentation about LIKE doesn't say that a copied constraint has properties different from the original, it seems that ignoring a NO INHERIT property doesn't meet the principle of least surprise. So make it copy th

pgsql: nbtree: Demote minus infinity "can't happen" error.

2020-03-10 Thread Peter Geoghegan
nbtree: Demote minus infinity "can't happen" error. Only a very basic logic bug in a _bt_insertonpg() caller could lead to a violation of this invariant. Besides, any newitemoff used for an internal page is sanitized using other "can't happen" errors in _bt_getstackbuf() or its callers, before _b

pgsql: Marginal comments and docs cleanup.

2020-03-10 Thread Tom Lane
Marginal comments and docs cleanup. Fix up some imprecise comments and poor markup from ba79cb5dc. Also try to convert the documentation of log_min_duration_sample and friends into passable English. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c8e8b2f9dfee21fa4e

pgsql: nbtree: Move fastpath NULL descent stack assertion.

2020-03-10 Thread Peter Geoghegan
nbtree: Move fastpath NULL descent stack assertion. Commit 074251db added an assertion that verified the fastpath/rightmost page insert optimization's assumption about free space: There should always be enough free space on the page to insert the new item without splitting the page. Otherwise, we

pgsql: Remove stray parenthesis in nbtree.h.

2020-03-10 Thread Peter Geoghegan
Remove stray parenthesis in nbtree.h. Oversight in commit 0d861bbb702. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a88a285c7e343502b55204a211818d12b1b7d6ff Modified Files -- src/include/access/nbtree.h | 2 +- 1 file changed, 1 insertion(+), 1 deleti