[HACKERS] help for old extension, first_last_agg bug in install with pg9.5

2016-03-28 Thread Peter Krauss
The C implementation is simple, the problem is with the makefile, https://github.com/wulczer/first_last_agg/issues/2 *some clues?* - - - make Makefile:25: /usr/lib/postgresql/9.5/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory make: *** No rule to make target `/usr/lib/postgresq

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread Peter Krauss
gresql.org/docs/9.5/static/functions-json.html> (!), it was not easy to arrive here, and need only a little bit more to reach perfection ;-) 2016-03-22 18:42 GMT-03:00 David G. Johnston : > On Tue, Mar 22, 2016 at 1:52 PM, Peter Krauss wrote: > >> Seems that parser not using

[HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread Peter Krauss
Seems that parser not using precedence ideal order, and that casting obligation losts performance. The first problem is self-evident in this example: SELECT '{"x":1}'::jsonb || (('{"A":{"y":2}}'::jsonb)->'A') -- it is ok, expected result with (x,y) SELECT '{"x":1}'::jsonb || '{"A":{"y":2}}'::js

Re: [HACKERS] looking for an array-extract-item-as-it operator

2016-01-11 Thread Peter Krauss
2:00 Peter Krauss : > > > 2016-01-06 20:50 GMT-02:00 Tom Lane : > >> Peter Krauss writes: >> > I need to access an array-item from an array of arrays. >> >> Multi-dimensional arrays in Postgres are *not* "arrays of arrays". >> > > T

[HACKERS] looking for an array-extract-item-as-it operator

2016-01-06 Thread Peter Krauss
I need to access an array-item from an array of arrays. Suppose WITH t AS (SELECT '{{1,2,3},{33,44,55}}'::int[][] as a)SELECT a[2],-- returns null (!), why not works? a[2:2], -- returns array-into-array, not a simple arrayFROM t; There are a simple function or operator to acess i

[HACKERS] Proposal for JSONB functions for internal representation casting insted text-casting

2016-01-03 Thread Peter Krauss
The usefulness of ->> operator is indisputable, but even with boolean or numeric values, with good binary internal representation, it returns JSONB value as text data type. The simple *(myJSONB->>'myField')::expectedType* is not enough because: 1) there are no internal optimization, need two-s

[HACKERS] need of anonymous record

2014-05-03 Thread Peter Krauss
My notion of "anonymous record", and the need of this kind of "higher-order type", are discussed in the links below, http://stackoverflow.com/q/23439240 "Functions can not to *return individual items of a record*" http://stackoverflow.com/q/21246201 "PostgreSQL v9.X have real '*array of recor