pgsql: Provide stable test for NULL-values in KNN SP-GiST

2019-09-20 Thread Alexander Korotkov
Provide stable test for NULL-values in KNN SP-GiST f5f084fc3e has removed test because of its instability. This commit provides alternative test with determined ordering using extra ORDER BY expression. Backpatch-through: 12 Branch -- master Details --- https://git.postgresql.org/pg/co

pgsql: Provide stable test for NULL-values in KNN SP-GiST

2019-09-20 Thread Alexander Korotkov
Provide stable test for NULL-values in KNN SP-GiST f5f084fc3e has removed test because of its instability. This commit provides alternative test with determined ordering using extra ORDER BY expression. Backpatch-through: 12 Branch -- REL_12_STABLE Details --- https://git.postgresql.or

pgsql: Fix progress report of REINDEX INDEX

2019-09-20 Thread Alvaro Herrera
Fix progress report of REINDEX INDEX I (Álvaro) broke that in commit 6212276e4343 -- forgot to set the necessary flag. Repair. Author: Amit Langote Discussion: https://postgr.es/m/ca+hiwqeam2tv5awkhp1vsbgjqe_uxvu15oi4stgwgempwmi...@mail.gmail.com Branch -- REL_12_STABLE Details --- ht

pgsql: Fix progress report of REINDEX INDEX

2019-09-20 Thread Alvaro Herrera
Fix progress report of REINDEX INDEX I (Álvaro) broke that in commit 6212276e4343 -- forgot to set the necessary flag. Repair. Author: Amit Langote Discussion: https://postgr.es/m/ca+hiwqeam2tv5awkhp1vsbgjqe_uxvu15oi4stgwgempwmi...@mail.gmail.com Branch -- master Details --- https://g

Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL

2019-09-20 Thread Alvaro Herrera
On 2019-Sep-17, Amit Langote wrote: Hi > I noticed that the progress of REINDEX INDEX index_name is no longer > shown; REINDEX TABLE table_name is fine. Maybe you missed updating > ReindexIndex() to pass the option to report progress, like this: That's right, I broke that case, and your patch f

pgsql: Revert "Add DECLARE STATEMENT support to ECPG."

2019-09-20 Thread Tom Lane
Revert "Add DECLARE STATEMENT support to ECPG." This reverts commit bd7c95f0c1a38becffceb3ea7234d57167f6d4bf, along with assorted follow-on fixes. There are some questions about the definition and implementation of that statement, and we don't have time to resolve them before v13 release. Rather

pgsql: Revert "Add DECLARE STATEMENT support to ECPG."

2019-09-20 Thread Tom Lane
Revert "Add DECLARE STATEMENT support to ECPG." This reverts commit bd7c95f0c1a38becffceb3ea7234d57167f6d4bf, along with assorted follow-on fixes. There are some questions about the definition and implementation of that statement, and we don't have time to resolve them before v13 release. Rather

pgsql: Fix some minor spec-compliance issues in jsonpath lexer.

2019-09-20 Thread Tom Lane
Fix some minor spec-compliance issues in jsonpath lexer. Although the SQL/JSON tech report makes reference to ECMAScript which allows both single- and double-quoted strings, all the rest of the report speaks only of double-quoted string literals in jsonpaths. That's more compatible with JSON itsel

pgsql: Fix some minor spec-compliance issues in jsonpath lexer.

2019-09-20 Thread Tom Lane
Fix some minor spec-compliance issues in jsonpath lexer. Although the SQL/JSON tech report makes reference to ECMAScript which allows both single- and double-quoted strings, all the rest of the report speaks only of double-quoted string literals in jsonpaths. That's more compatible with JSON itsel

pgsql: Refactor code into new JsonbValueAsText, and use it more

2019-09-20 Thread Alvaro Herrera
Refactor code into new JsonbValueAsText, and use it more jsonb_object_field_text and jsonb_array_element_text both contained identical copies of this code, so extract that into new routine JsonbValueAsText. This can also be used in other places, to measurable performance benefit: the jsonb_each()

pgsql: Optimize get_jsonb_path_all avoiding an iterator

2019-09-20 Thread Alvaro Herrera
Optimize get_jsonb_path_all avoiding an iterator Instead of creating an iterator object at each step down the JSONB object/array, we can just just examine its object/array flags, which is faster. Also, use the recently introduced JsonbValueAsText instead of open-coding the same thing, for code si

pgsql: Split out code into new getKeyJsonValueFromContainer()

2019-09-20 Thread Alvaro Herrera
Split out code into new getKeyJsonValueFromContainer() The new function stashes its output value in a JsonbValue that can be passed in by the caller, which enables some of them to pass stack-allocated structs -- saving palloc cycles. It also allows some callers that know they are handling a jsonb

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -

pgsql: Update time zone data files to tzdata release 2019c.

2019-09-20 Thread Tom Lane
Update time zone data files to tzdata release 2019c. DST law changes in Fiji and Norfolk Island. Historical corrections for Alberta, Austria, Belgium, British Columbia, Cambodia, Hong Kong, Indiana (Perry County), Kaliningrad, Kentucky, Michigan, Norfolk Island, South Korea, and Turkey. Branch -