pgsql: Doc: improve partitioning discussion in ddl.sgml.

2020-11-14 Thread Tom Lane
Doc: improve partitioning discussion in ddl.sgml.

This started with the intent to explain that range upper bounds
are exclusive, which previously you could only find out by reading
the CREATE TABLE man page.  But I soon found that section 5.11
really could stand a fair amount of editorial attention.  It's
apparently been revised several times without much concern for
overall flow, nor careful copy-editing.

Back-patch to v11, which is as far as the patch goes easily.

Per gripe from Edson Richter.  Thanks to David Johnston for review.

Discussion: 
https://postgr.es/m/dm6pr13mb3988736cf8f5dc5720440231cf...@dm6pr13mb3988.namprd13.prod.outlook.com

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/2b77595085423970036afd6263046c5747534dd0

Modified Files
--
doc/src/sgml/ddl.sgml | 373 +++---
1 file changed, 204 insertions(+), 169 deletions(-)



pgsql: Doc: improve partitioning discussion in ddl.sgml.

2020-11-14 Thread Tom Lane
Doc: improve partitioning discussion in ddl.sgml.

This started with the intent to explain that range upper bounds
are exclusive, which previously you could only find out by reading
the CREATE TABLE man page.  But I soon found that section 5.11
really could stand a fair amount of editorial attention.  It's
apparently been revised several times without much concern for
overall flow, nor careful copy-editing.

Back-patch to v11, which is as far as the patch goes easily.

Per gripe from Edson Richter.  Thanks to David Johnston for review.

Discussion: 
https://postgr.es/m/dm6pr13mb3988736cf8f5dc5720440231cf...@dm6pr13mb3988.namprd13.prod.outlook.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/dbca94510c9e564708a10a1259f6f1d8ad09862c

Modified Files
--
doc/src/sgml/ddl.sgml | 371 +++---
1 file changed, 203 insertions(+), 168 deletions(-)



pgsql: Doc: improve partitioning discussion in ddl.sgml.

2020-11-14 Thread Tom Lane
Doc: improve partitioning discussion in ddl.sgml.

This started with the intent to explain that range upper bounds
are exclusive, which previously you could only find out by reading
the CREATE TABLE man page.  But I soon found that section 5.11
really could stand a fair amount of editorial attention.  It's
apparently been revised several times without much concern for
overall flow, nor careful copy-editing.

Back-patch to v11, which is as far as the patch goes easily.

Per gripe from Edson Richter.  Thanks to David Johnston for review.

Discussion: 
https://postgr.es/m/dm6pr13mb3988736cf8f5dc5720440231cf...@dm6pr13mb3988.namprd13.prod.outlook.com

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/a87d7801c24ffb3593841838ba0e3d4883d34853

Modified Files
--
doc/src/sgml/ddl.sgml | 372 +++---
1 file changed, 203 insertions(+), 169 deletions(-)



pgsql: Doc: improve partitioning discussion in ddl.sgml.

2020-11-14 Thread Tom Lane
Doc: improve partitioning discussion in ddl.sgml.

This started with the intent to explain that range upper bounds
are exclusive, which previously you could only find out by reading
the CREATE TABLE man page.  But I soon found that section 5.11
really could stand a fair amount of editorial attention.  It's
apparently been revised several times without much concern for
overall flow, nor careful copy-editing.

Back-patch to v11, which is as far as the patch goes easily.

Per gripe from Edson Richter.  Thanks to David Johnston for review.

Discussion: 
https://postgr.es/m/dm6pr13mb3988736cf8f5dc5720440231cf...@dm6pr13mb3988.namprd13.prod.outlook.com

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/0e0e71abdcaeb8a3887094de078b77cb35bd03ba

Modified Files
--
doc/src/sgml/ddl.sgml | 371 +++---
1 file changed, 203 insertions(+), 168 deletions(-)



pgsql: Provide the OR REPLACE option for CREATE TRIGGER.

2020-11-14 Thread Tom Lane
Provide the OR REPLACE option for CREATE TRIGGER.

This is mostly straightforward.  However, we disallow replacing
constraint triggers or changing the is-constraint property; perhaps
that can be added later, but the complexity versus benefit tradeoff
doesn't look very good.

Also, no special thought is taken here for whether replacing an
existing trigger should result in changes to queued-but-not-fired
trigger actions.  We just document that if you're surprised by the
results, too bad, don't do that.  (Note that any such pending trigger
activity would have to be within the current session.)

Takamichi Osumi, reviewed at various times by Surafel Temesgen,
Peter Smith, and myself

Discussion: 
https://postgr.es/m/0DDF369B45A1B44B8A687ED43F06557C010BC362@G01JPEXMBYT03

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/92bf7e2d027466d750b4ac5b026f6f4ac29be881

Modified Files
--
doc/src/sgml/ref/create_trigger.sgml   |  76 +-
src/backend/catalog/index.c|   7 +-
src/backend/commands/tablecmds.c   |  28 +++---
src/backend/commands/trigger.c | 174 +++--
src/backend/nodes/copyfuncs.c  |   3 +-
src/backend/nodes/equalfuncs.c |   3 +-
src/backend/parser/gram.y  |  52 +-
src/include/nodes/parsenodes.h |   3 +-
src/test/regress/expected/triggers.out |  89 +
src/test/regress/sql/triggers.sql  |  87 +
10 files changed, 408 insertions(+), 114 deletions(-)



pgsql: Handle equality operator in contrib/pg_trgm

2020-11-14 Thread Alexander Korotkov
Handle equality operator in contrib/pg_trgm

Obviously, in order to equality operator be satisfiable, target string must
contain all the trigrams of the search string.  On this base, we implement
equality operator in GiST/GIN indexes with recheck.

Discussion: 
https://postgr.es/m/CAOBaU_YWwtT7tdggtROacjdOdeYHCz-tmSwuC-j-TOG-g97J0w%40mail.gmail.com
Author: Julien Rouhaud
Reviewed-by: Tom Lane, Alexander Korotkov, Georgios Kokolatos, Erik Rijkers

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/935f502250abde8615bc7805a6e5aa05a066

Modified Files
--
contrib/pg_trgm/Makefile  |   2 +-
contrib/pg_trgm/expected/pg_trgm.out  | 204 +-
contrib/pg_trgm/pg_trgm--1.5--1.6.sql |  10 ++
contrib/pg_trgm/pg_trgm.control   |   2 +-
contrib/pg_trgm/sql/pg_trgm.sql   |  40 +++
contrib/pg_trgm/trgm.h|   1 +
contrib/pg_trgm/trgm_gin.c|   3 +
contrib/pg_trgm/trgm_gist.c   |   4 +-
doc/src/sgml/pgtrgm.sgml  |   8 +-
9 files changed, 264 insertions(+), 10 deletions(-)



pgsql: Fix alphabetic ordering in typedefs.list

2020-11-14 Thread Alexander Korotkov
Fix alphabetic ordering in typedefs.list

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/8afa3795a7a29f018769f16f6af936439847bd66

Modified Files
--
src/tools/pgindent/typedefs.list | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)