Yeaha didn't work either on http://jsonprettyprint.net
http://jsonprettyprint.net for me.
--
View this message in context:
http://postgresql.nabble.com/mogrify-and-indent-features-for-jsonb-tp5838008p5848933.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
--
Andrew Dunstan and...@dunslane.net wrote:
It's a matter of taste, but I find things a lot easier to
understand when they are symmetrical. Thus I like all the
branches of an if to be either in a block or not, and I like
braces to line up either horizontally or vertically. Perhaps this
On April 29, 2015 03:09:51 PM Andrew Dunstan wrote:
On 04/29/2015 01:19 PM, Robert Haas wrote:
On Mon, Apr 27, 2015 at 6:41 PM, Andrew Dunstan and...@dunslane.net
wrote:
There's one exception I, at least, have to this rule, namely when there's
a
corresponding compound if or else. I
On Mon, Apr 27, 2015 at 6:41 PM, Andrew Dunstan and...@dunslane.net wrote:
There's one exception I, at least, have to this rule, namely when there's a
corresponding compound if or else. I personally find this unaesthetic to put
it mildly:
if (condition)
statement;
else
{
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote:
Robert Haas wrote:
On Mon, Apr 27, 2015 at 6:41 PM, Andrew Dunstan and...@dunslane.net wrote:
There's one exception I, at least, have to this rule, namely when there's
a
corresponding compound if or else. I personally find this
Robert Haas wrote:
On Mon, Apr 27, 2015 at 6:41 PM, Andrew Dunstan and...@dunslane.net wrote:
There's one exception I, at least, have to this rule, namely when there's a
corresponding compound if or else. I personally find this unaesthetic to put
it mildly:
if (condition)
On 27/04/15 18:46, Petr Jelinek wrote:
On 18/04/15 20:35, Dmitry Dolgov wrote:
Sorry for late reply. Here is a slightly improved version of the patch
with the new `h_atoi` function, I hope this implementation will be more
appropriate.
It's better, but a) I don't like the name of the function
On 04/27/2015 12:46 PM, Petr Jelinek wrote:
Another thing I noticed now when reading the code again - you should
not be using braces when you only have one command in the code-block.
There's one exception I, at least, have to this rule, namely when
there's a corresponding compound if or
On 18/04/15 20:35, Dmitry Dolgov wrote:
Sorry for late reply. Here is a slightly improved version of the patch
with the new `h_atoi` function, I hope this implementation will be more
appropriate.
It's better, but a) I don't like the name of the function b) I don't see
why we need the
On 01/03/15 16:49, Andrew Dunstan wrote:
On 03/01/2015 05:03 AM, Petr Jelinek wrote:
On 23/02/15 18:15, Dmitry Dolgov wrote:
Hi, Petr, thanks for the review.
I think it would be better if the ident printing didn't put the
start of array ([) and start of dictionary ({) on separate line
Did
On Sat, 14 Feb 2015 22:06:07 -0500
Andrew Dunstan and...@dunslane.net wrote:
Hello.
I have function with recursive merging objects:
# SELECT jsonb_deep_extend('{a: {b: 6}}'::jsonb, '{a: {c:
7}}'::jsonb) AS new_jsonb;
new_jsonb
-
{a: {b: 6, c: 7}}
On 23/02/15 18:15, Dmitry Dolgov wrote:
Hi, Petr, thanks for the review.
I think it would be better if the ident printing didn't put the
start of array ([) and start of dictionary ({) on separate line
Did you mean this?
[
{
a: 1,
b: 2
}
]
On 03/01/2015 05:03 AM, Petr Jelinek wrote:
On 23/02/15 18:15, Dmitry Dolgov wrote:
Hi, Petr, thanks for the review.
I think it would be better if the ident printing didn't put the
start of array ([) and start of dictionary ({) on separate line
Did you mean this?
[
{
On 26 February 2015 at 15:09, Dmitry Dolgov 9erthali...@gmail.com wrote:
Hi, Thom.
Would this support deleting type and the value 'dd'
With this patch you can delete them one by one:
select '{a: 1, b: 2, c: {type: json, stuff: test}, d:
[aa,bb,cc,dd]}'::jsonb - '{c, type}'::text[] -
Hi, Thom.
Would this support deleting type and the value 'dd'
With this patch you can delete them one by one:
select '{a: 1, b: 2, c: {type: json, stuff: test}, d:
[aa,bb,cc,dd]}'::jsonb - '{c, type}'::text[] - '{d, -1}'::text[];
?column?
On 02/26/2015 07:25 AM, Thom Brown wrote:
Yeah, I think that may be problematic. I agree with Josh that there's
probably no sane mix of operators for this, as I would expect your
example to replace d: [aa,bb,cc,dd] with d: [ee] rather
than append to it. Hmm... unless we used a + operator,
On 02/25/2015 03:13 AM, Thom Brown wrote:
Can you think of a reasonable syntax for doing that via operators? I
can imagine that as a json_path function, i.e.:
jsonb_add_to_path(jsonb, text[], jsonb)
or where the end of the path is an array:
jsonb_add_to_path(jsonb,
On 24 February 2015 at 19:16, Josh Berkus j...@agliodbs.com wrote:
Is there a way to take the json:
'{a: 1, b: 2, c: {type: json, stuff: test}, d:
[aa,bb,cc,dd]}'
and add ee to d without replacing it? I can think of ways of
currently doing it, but it's very convoluted just for
Is there a way to take the json:
'{a: 1, b: 2, c: {type: json, stuff: test}, d:
[aa,bb,cc,dd]}'
and add ee to d without replacing it? I can think of ways of
currently doing it, but it's very convoluted just for pushing a value to
an array.
Can you think of a reasonable syntax for
Hi, Petr, thanks for the review.
I think it would be better if the ident printing didn't put the start
of array ([) and start of dictionary ({) on separate line
Did you mean this?
[
{
a: 1,
b: 2
}
]
I tried to verify this in several ways
On 15 February 2015 at 03:06, Andrew Dunstan and...@dunslane.net wrote:
Attached is a patch to provide a number of very useful facilities to jsonb
that people have asked for. These are based on work by Dmitry Dolgov in his
jsonbx extension, but I take responsibility for any bugs.
The
Hi,
I looked at the patch and have several comments.
First let me say that modifying the individual paths of the json is the
feature I miss the most in the current implementation so I am happy that
this patch was submitted.
I would prefer slightly the patch split into two parts, one for the
On 02/15/2015 11:47 AM, Sehrope Sarkuni wrote:
For jsonb_indent, how about having it match up closer to the
JavaScript JSON.stringify(value, replacer, space)[1]? That way a user
can specify the indentation level and optionally filter the fields
they'd like to output.
In JS, the replacer
For jsonb_indent, how about having it match up closer to the
JavaScript JSON.stringify(value, replacer, space)[1]? That way a user
can specify the indentation level and optionally filter the fields
they'd like to output.
In JS, the replacer parameter can be either a JS function or an
array of
On 02/14/2015 10:06 PM, Andrew Dunstan wrote:
Attached is a patch to provide a number of very useful facilities to
jsonb that people have asked for. These are based on work by Dmitry
Dolgov in his jsonbx extension, but I take responsibility for any bugs.
The facilities are:
new
25 matches
Mail list logo