ns.
Attached patch implements this feature for JSON query functions,
JSON_TABLE is
not supported now because it needs some refactoring.
I have pushed this commit to the separate branch because it is not
finished yet:
https://github.com/postgrespro/sqljson/tree/sqljson_variable_json_path
--
Nikita
bquery variant of JSON_ARRAY I can only offer to leave transformation
into a subselect with JSON_ARRAYAGG():
JSON_ARRAY(query) => (SELECT JSON_ARRAYAGG(bar) FROM (query) foo(bar))
--
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsq
On 29.09.2017 12:59, Pavel Stehule wrote:
Hi
2017-09-16 1:31 GMT+02:00 Nikita Glukhov <mailto:n.glu...@postgrespro.ru>>:
On 15.09.2017 22:36, Oleg Bartunov wrote:
On Fri, Sep 15, 2017 at 7:31 PM, Robert Haas
mailto:robertmh...@gmail.com>> wrote:
ate thread for this issue and add patches to
commitfest?
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
>From 52ab493cfe1ec6260578054b71f2c48e77d4850a Mon Sep 17 00:00:00 2001
From: Nikita Glukhov
Date: Fri, 22 Sep 2017 02:06:48 +0300
Sub
ox->low.x to be NaN when circle->center.x is and
circle->radius are both +Infinity. Without this float-order-preserving
swapping
one regression test for KNN with ORDER BY index will be totally broken
(you can
try it: https://github.com/glukhovn/postgres/tree/knn). Unfortunately, I
On 18.09.2017 00:38, Alvaro Herrera wrote:
Nikita Glukhov wrote:
0007-json_table-v02.patch:
- JSON_TABLE using XMLTABLE infrastructure
0008-json_table-json-v02.patch:
- JSON_TABLE support for json type
I'm confused ... why are these two patches and not a single one?
As I sad b
On 30.05.2017 02:31, Tom Lane wrote:
Nikita Glukhov writes:
2. Also I've found a some kind of thinko in JsGetObjectSize() macro, but it
seems that this obvious mistake can not lead to incorrect behavior.
Hm, I think it actually was wrong for the case of jsonb_cont == NULL,
wasn't
NULL fields. So I think it would be better to throw an error
in jsonb case too, but I'm not sure.
2. Also I've found a some kind of thinko in JsGetObjectSize() macro, but it
seems that this obvious mistake can not lead to incorrect behavior.
--
Nikita Glukhov
Postgres Pr
On 04.05.2017 22:16, Tom Lane wrote:
Nikita Glukhov writes:
In gistrescan() IndexScanDesc.xs_hitup is not reset after MemoryContextReset()
of
so->queueCxt in which xs_hitup was allocated, then getNextNearest() tries to
pfree()
dangling xs_hitup, which results in the reuse of this poin
esent in v9.5, v9.6, v10.0.
--
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c
index 2526a39..580b6ac 100644
--- a/src/backend/access/gist/gistscan.c
+++ b/src/
parsing passes for nested json objects/arrays
instead of a single parsing pass.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index bf2c91f..da29dab 100644
--- a/sr
ll make sense, but the Kyotaro's test case doesn't work for me and
I still don't know how to force SP-GiST to create inner leaves without
inserting hundreds of rows.
--
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/backend
Attached v02 version (rebased to HEAD).
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index f92baed..1dfaba2 100644
--- a/src/backend/access/gist/gistutil.c
On 02.02.2017 01:07, Jim Nasby wrote:
On 2/1/17 8:26 AM, Nikita Glukhov wrote:
Some comments about the code: I think it would be better to
* add function for extraction of scalars from pseudo-arrays
* iterate until WJB_DONE to pfree iterator
I'm not sure what your intent here is, but i
PG_RETURN_INT32(DatumGetInt32(DirectFunctionCall1(numeric_int4,
NumericGetDatum(v.val.numeric;
}
--
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-hackers mailing list
r_consistent()
using only one box because index tree must have at least one inner node (or 157
boxes)
in order to spg_box_quad_inner_consistent() began to be called. That's why
existing
tests for box_ops didn't detect this bug: box_temp table has only 56 rows.
--
Nikita Glukhov
Pos
thub.com/glukhovn/postgres/commits/knn_spgist
Please note that the tests for circle_ops and poly_ops will not work until
the а bug found in SP-GiST box_ops will not be fixed
(see
https://www.postgresql.org/message-id/9ea5b157-478c-8874-bc9b-050076b7d042%40postgrespro.ru).
--
Nikita Glukhov
Postgres
On 30.01.2017 12:04, Kyotaro HORIGUCHI wrote:
Hello,
At Mon, 30 Jan 2017 07:12:03 +0300, Nikita Glukhov
wrote
in <9ea5b157-478c-8874-bc9b-050076b7d...@postgrespro.ru>:
Working on the tests for new SP-GiST opclasses for polygons and
circles, I've found a bug in the SP-GiST box_op
GiST index scan (see tests
in the attached patch, their results were taken from a sequential scan).
--
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/backend/utils/adt/geo_spgist.c b/src/backend/utils/adt/geo_spgist.c
index aacb340..446
at;
/* try to convert json string to a non-scalar type through input function
*/
if (JsValueIsString(jsv) &&
(typcat == TYPECAT_ARRAY || typcat == TYPECAT_COMPOSITE))
typcat = TYPECAT_SCALAR;
/* we must perform domain checks for NULLs */
if (*isnul
BJECT) != 0)
Sorry for this obvious mistake. But macros JB_ROOT_IS_XXX() also contain the
same hazard.
7. More generally, the patch is hard to review because it whacks the
existing code around so thoroughly that it's tough even to match up
old and new code to get a handle on what you chang
scan = OFF;
...
RESET enable_indexscan;
Obviously, the last line should be
RESET enable_indexonlyscan;
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index
f btree_gist from 1.3 to 1.4 would fail.
7. Add regression tests for btree kNN.
Tests were added only after the built-in distance operators were added.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-hackers mailing list (p
behavior that the second patch brings in (see changes in json.out and
jsonb.out).
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e3186..55cacfb 100644
--- a/doc/src/sgml/func.
populate_composite()
and also in populate_record_worker() (by using populate_composite()
instead of populate_record()). These improvements can speed up bulk
jsonb conversion by 15-20% in the simple test with two nested records.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.c
true"
The second patch adds assignment of correct ndims to array fields of
RECORD function result types.
Without this patch, attndims in tuple descriptors of RECORD types is
always 0 and the corresponding assertion fails in the next test:
[patched]=# select json_to_record('{"a": [
#x27;), ('[true]'), ('[[]]'), ('[{}]'),
('{"a": null}'), ('{"a": 0}'), ('{"a": ""}'), ('{"a": true}'),
('{"a": []}'), ('{"a": {}}')
) va
ached patch contains:
1. bug fix (added the missing "else" in compareJsonbContainers())
2. regression test
3. pg_upgrade: invalidation of btree indexes on jsonb columns and
REINDEX-script generation
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Po
28 matches
Mail list logo