Re: [HACKERS] factor out encoding dependent json/jsonb regression tests

2015-10-05 Thread Tom Lane
Andrew Dunstan  writes:
> I'm rather tired of having to update two sets of output files every time 
> we change the json and jsonb regression tests. Also, other committers 
> occasionally fall over this trap and fail to update json_1.out and 
> jsonb_1.out, as do almost all other patch authors. I propose that we 
> remove those tests to quite small json_utf8.sql and jsonb_utf8.sql 
> (which will each have 2 output files) and that will allow us to get rid 
> of json_1.out and jsonb_1.out. I'd like to backpatch this to 9.4 for 
> jsonb and 9.2 for json. Alternatively, for >= 9.4 we could just add the 
> jsonb encoding-specific tests to json_utf8.sql, to avoid a greater 
> proliferation of tests.

I'd vote for your alternative plan (ie, just one new regression .sql
file).  It will be so small that having two even-smaller ones seems silly.

Is "json_utf8" really the best name, or should it be "json_encoding"?

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] factor out encoding dependent json/jsonb regression tests

2015-10-05 Thread Peter Geoghegan
On Mon, Oct 5, 2015 at 10:32 AM, Andrew Dunstan  wrote:
> I'm rather tired of having to update two sets of output files every time we
> change the json and jsonb regression tests. Also, other committers
> occasionally fall over this trap and fail to update json_1.out and
> jsonb_1.out, as do almost all other patch authors. I propose that we remove
> those tests to quite small json_utf8.sql and jsonb_utf8.sql (which will each
> have 2 output files) and that will allow us to get rid of json_1.out and
> jsonb_1.out. I'd like to backpatch this to 9.4 for jsonb and 9.2 for json.
> Alternatively, for >= 9.4 we could just add the jsonb encoding-specific
> tests to json_utf8.sql, to avoid a greater proliferation of tests.

While I figured out a way of dealing with that that is minimally
annoying, it is a little confusing.

+1 to doing this, and +1 to backpatching. I don't think that there is
actually very much different between each output.

-- 
Peter Geoghegan


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] factor out encoding dependent json/jsonb regression tests

2015-10-05 Thread Andrew Dunstan



On 10/05/2015 01:53 PM, Tom Lane wrote:

Andrew Dunstan  writes:

I'm rather tired of having to update two sets of output files every time
we change the json and jsonb regression tests. Also, other committers
occasionally fall over this trap and fail to update json_1.out and
jsonb_1.out, as do almost all other patch authors. I propose that we
remove those tests to quite small json_utf8.sql and jsonb_utf8.sql
(which will each have 2 output files) and that will allow us to get rid
of json_1.out and jsonb_1.out. I'd like to backpatch this to 9.4 for
jsonb and 9.2 for json. Alternatively, for >= 9.4 we could just add the
jsonb encoding-specific tests to json_utf8.sql, to avoid a greater
proliferation of tests.

I'd vote for your alternative plan (ie, just one new regression .sql
file).  It will be so small that having two even-smaller ones seems silly.

Is "json_utf8" really the best name, or should it be "json_encoding"?



I'm fine with "json_enccoding". I'll do it that way.

cheers

andrew



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] factor out encoding dependent json/jsonb regression tests

2015-10-05 Thread Alvaro Herrera
Andrew Dunstan wrote:
> I'm rather tired of having to update two sets of output files every time we
> change the json and jsonb regression tests. Also, other committers
> occasionally fall over this trap and fail to update json_1.out and
> jsonb_1.out, as do almost all other patch authors. I propose that we remove
> those tests to quite small json_utf8.sql and jsonb_utf8.sql (which will each
> have 2 output files) and that will allow us to get rid of json_1.out and
> jsonb_1.out. I'd like to backpatch this to 9.4 for jsonb and 9.2 for json.

+1.

> Alternatively, for >= 9.4 we could just add the jsonb encoding-specific
> tests to json_utf8.sql, to avoid a greater proliferation of tests.

shrug

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] factor out encoding dependent json/jsonb regression tests

2015-10-05 Thread Andrew Dunstan
I'm rather tired of having to update two sets of output files every time 
we change the json and jsonb regression tests. Also, other committers 
occasionally fall over this trap and fail to update json_1.out and 
jsonb_1.out, as do almost all other patch authors. I propose that we 
remove those tests to quite small json_utf8.sql and jsonb_utf8.sql 
(which will each have 2 output files) and that will allow us to get rid 
of json_1.out and jsonb_1.out. I'd like to backpatch this to 9.4 for 
jsonb and 9.2 for json. Alternatively, for >= 9.4 we could just add the 
jsonb encoding-specific tests to json_utf8.sql, to avoid a greater 
proliferation of tests.


Thoughts?

cheers

andrew


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers