pgsql: doc: Reorder JSON functions documentation

2019-09-26 Thread Peter Eisentraut
doc: Reorder JSON functions documentation

Put the description of the SQL/JSON path language after the
description of the general JSON functions and operators, instead of
before.

Discussion: https://www.postgresql.org/message-id/16968.1569189...@sss.pgh.pa.us

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/66e0ea75bb9d4b40c734067dd7c7e1fc804a88cb

Modified Files
--
doc/src/sgml/func.sgml | 1649 
1 file changed, 823 insertions(+), 826 deletions(-)



pgsql: doc: Reorder JSON functions documentation

2019-09-26 Thread Peter Eisentraut
doc: Reorder JSON functions documentation

Put the description of the SQL/JSON path language after the
description of the general JSON functions and operators, instead of
before.

Discussion: https://www.postgresql.org/message-id/16968.1569189...@sss.pgh.pa.us

Branch
--
master

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

Modified Files
--
doc/src/sgml/func.sgml | 2706 
1 file changed, 1351 insertions(+), 1355 deletions(-)



pgsql: doc: Update note about source code formatting

2019-09-26 Thread Peter Eisentraut
doc: Update note about source code formatting

Update the note about why not to use // comments, even though it's now
technically supported.

The note about variable declarations was dropped here because it's
addressed more properly later in the chapter.

Discussion: 
https://www.postgresql.org/message-id/flat/156924954640.1117.6309209869705522549%40wrigleys.postgresql.org

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/49e36e7901c691fd7e80ba56465b649a211290cf

Modified Files
--
doc/src/sgml/sources.sgml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



pgsql: doc: Update note about source code formatting

2019-09-26 Thread Peter Eisentraut
doc: Update note about source code formatting

Update the note about why not to use // comments, even though it's now
technically supported.

The note about variable declarations was dropped here because it's
addressed more properly later in the chapter.

Discussion: 
https://www.postgresql.org/message-id/flat/156924954640.1117.6309209869705522549%40wrigleys.postgresql.org

Branch
--
REL_12_STABLE

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

Modified Files
--
doc/src/sgml/sources.sgml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



pgsql: doc: Update a confusing sentence about SQL/JSON

2019-09-26 Thread Peter Eisentraut
doc: Update a confusing sentence about SQL/JSON

Author: Liudmila Mantrova 
Reported-by: Jeff Janes 
Discussion: 
https://www.postgresql.org/message-id/flat/CAMkU%3D1wP-SO4KpiLxHJuPezTJCmK%3DJqefLXrr3eXFO7Qku%2BtMg%40mail.gmail.com

Branch
--
REL_12_STABLE

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

Modified Files
--
doc/src/sgml/json.sgml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



pgsql: doc: Update a confusing sentence about SQL/JSON

2019-09-26 Thread Peter Eisentraut
doc: Update a confusing sentence about SQL/JSON

Author: Liudmila Mantrova 
Reported-by: Jeff Janes 
Discussion: 
https://www.postgresql.org/message-id/flat/CAMkU%3D1wP-SO4KpiLxHJuPezTJCmK%3DJqefLXrr3eXFO7Qku%2BtMg%40mail.gmail.com

Branch
--
master

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

Modified Files
--
doc/src/sgml/json.sgml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



pgsql: doc: Format example JSON data better

2019-09-26 Thread Peter Eisentraut
doc: Format example JSON data better

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/6c3ef7482f2bdedc68146a4ffcba4b8b241b91a9

Modified Files
--
doc/src/sgml/func.sgml | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)



pgsql: doc: Fix whitespace in markup

2019-09-26 Thread Peter Eisentraut
doc: Fix whitespace in markup

Branch
--
REL_12_STABLE

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

Modified Files
--
doc/src/sgml/func.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgsql: doc: Fix whitespace in markup

2019-09-26 Thread Peter Eisentraut
doc: Fix whitespace in markup

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/8190164e82ae03bde80864ab0941794a90e70483

Modified Files
--
doc/src/sgml/func.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgsql: doc: Format example JSON data better

2019-09-26 Thread Peter Eisentraut
doc: Format example JSON data better

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/79504cfe1b23cd22c78dd5786f81f40905c5cce0

Modified Files
--
doc/src/sgml/func.sgml | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)



Re: pgsql: Support reloptions of enum type

2019-09-26 Thread Michael Paquier
On Thu, Sep 26, 2019 at 08:41:52AM +0900, Michael Paquier wrote:
> Do you mind if I apply the attached to fix the issue?  Or perhaps you
> would prefer fixing the issue yourself?  I noted some inconsistencies
> with the rest while on it (please see attached).

And applied as of fbfa566.
--
Michael


signature.asc
Description: PGP signature


pgsql: Fix lockmode initialization for custom relation options

2019-09-26 Thread Michael Paquier
Fix lockmode initialization for custom relation options

The code was enforcing AccessExclusiveLock for all custom relation
options, which is incorrect as the APIs allow a custom lock level to be
set.

While on it, fix a couple of inconsistencies in the tests and the README
of dummy_index_am.

Oversights in commit 773df88.

Discussion: https://postgr.es/m/20190925234152.ga2...@paquier.xyz

Branch
--
master

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

Modified Files
--
src/backend/access/common/reloptions.c  | 7 ---
src/test/modules/dummy_index_am/README  | 1 +
src/test/modules/dummy_index_am/expected/reloptions.out | 4 +++-
src/test/modules/dummy_index_am/sql/reloptions.sql  | 1 +
4 files changed, 5 insertions(+), 8 deletions(-)



Re: pgsql: Support reloptions of enum type

2019-09-26 Thread Alvaro Herrera
Hello, sorry I didn't notice this email.

On 2019-Sep-26, Michael Paquier wrote:

> This part from commit 773df88 is incorrect:

> +   /*
> +* Set the default lock mode for this option.  There is no actual way
> +* for a module to enforce it when declaring a custom relation option,
> +* so just use the highest level, which is safe for all cases.
> +*/
> +   newoption->lockmode = AccessExclusiveLock;

You're right, this was a merge blunder :-(  Sorry about that.

> Do you mind if I apply the attached to fix the issue?  Or perhaps you
> would prefer fixing the issue yourself?  I noted some inconsistencies
> with the rest while on it (please see attached).

Thanks for fixing.  It all looks correct to me.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: pgsql: Support reloptions of enum type

2019-09-26 Thread Michael Paquier
On Thu, Sep 26, 2019 at 10:19:47PM -0300, Alvaro Herrera wrote:
> Thanks for fixing.  It all looks correct to me.

Thanks for double-checking.
--
Michael


signature.asc
Description: PGP signature


pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
REL_10_STABLE

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

Modified Files
--
src/test/regress/expected/rangetypes.out | 2 +-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/89c98c6ce36aac802617ad10f1618711534875a6

Modified Files
--
src/test/regress/expected/rangetypes.out | 3 ++-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)



pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/668918ff1378e60665db314c2774bbf7459036ff

Modified Files
--
src/test/regress/expected/rangetypes.out | 2 +-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
master

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

Modified Files
--
src/test/regress/expected/rangetypes.out | 2 +-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/8364ef925c59485bc01b36230e9e0099d46ea186

Modified Files
--
src/test/regress/expected/rangetypes.out | 3 ++-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)



pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/84ced048d18d166d81a994caafa76077ddc41af8

Modified Files
--
src/test/regress/expected/rangetypes.out | 2 +-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252

2019-09-26 Thread Amit Kapila
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.

The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: 
https://postgr.es/m/CA+renyV=us-5xfmc25bnp-uwsj39xghhmge9rh2cqkmegsj...@mail.gmail.com

Branch
--
REL_12_STABLE

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

Modified Files
--
src/test/regress/expected/rangetypes.out | 2 +-
src/test/regress/sql/rangetypes.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Add tab completion for EXPLAIN (SETTINGS) in psql

2019-09-26 Thread Michael Paquier
Add tab completion for EXPLAIN (SETTINGS) in psql

Author: Justin Pryzby
Reviewed-by: Tatsuro Yamada
Discussion: https://postgr.es/m/20190927022051.gc24...@telsasoft.com
Backpatch-through: 12

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/268c4e9d4d88f5b4baca88ef31e914a1ac1fb7e9

Modified Files
--
src/bin/psql/tab-complete.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



pgsql: Add tab completion for EXPLAIN (SETTINGS) in psql

2019-09-26 Thread Michael Paquier
Add tab completion for EXPLAIN (SETTINGS) in psql

Author: Justin Pryzby
Reviewed-by: Tatsuro Yamada
Discussion: https://postgr.es/m/20190927022051.gc24...@telsasoft.com
Backpatch-through: 12

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/4b011cad272e997935eb8d80ab741a40b395fdf5

Modified Files
--
src/bin/psql/tab-complete.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)