From: Maciek Sakrejda Date: Thu, 6 Mar 2014 21:15:39 +0000 (-0800) Subject: Additional reformatting X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=db2fb222adf1d986d38ed843d70508b91c17cb27;p=users%2Fandresfreund%2Fpostgres.git Additional reformatting --- diff --git a/src/test/regress/expected/jsonb.out b/src/test/regress/expected/jsonb.out index c88ded7f97..dce59eb2fd 100644 --- a/src/test/regress/expected/jsonb.out +++ b/src/test/regress/expected/jsonb.out @@ -361,33 +361,25 @@ SELECT jsonb_object_keys(test_json) FROM test_jsonb WHERE json_type = 'object'; (3 rows) -- nulls -select (test_json->'field3') is null as expect_false -from test_jsonb -where json_type = 'object'; +select (test_json->'field3') is null as expect_false from test_jsonb where json_type = 'object'; expect_false -------------- f (1 row) -select (test_json->>'field3') is null as expect_true -from test_jsonb -where json_type = 'object'; +select (test_json->>'field3') is null as expect_true from test_jsonb where json_type = 'object'; expect_true ------------- t (1 row) -select (test_json->3) is null as expect_false -from test_jsonb -where json_type = 'array'; +select (test_json->3) is null as expect_false from test_jsonb where json_type = 'array'; expect_false -------------- f (1 row) -select (test_json->>3) is null as expect_true -from test_jsonb -where json_type = 'array'; +select (test_json->>3) is null as expect_true from test_jsonb where json_type = 'array'; expect_true ------------- t diff --git a/src/test/regress/sql/jsonb.sql b/src/test/regress/sql/jsonb.sql index bead7d82a9..22ee296986 100644 --- a/src/test/regress/sql/jsonb.sql +++ b/src/test/regress/sql/jsonb.sql @@ -90,31 +90,16 @@ SELECT jsonb_object_keys(test_json) FROM test_jsonb WHERE json_type = 'object'; -- nulls -select (test_json->'field3') is null as expect_false -from test_jsonb -where json_type = 'object'; - -select (test_json->>'field3') is null as expect_true -from test_jsonb -where json_type = 'object'; - -select (test_json->3) is null as expect_false -from test_jsonb -where json_type = 'array'; - -select (test_json->>3) is null as expect_true -from test_jsonb -where json_type = 'array'; - +select (test_json->'field3') is null as expect_false from test_jsonb where json_type = 'object'; +select (test_json->>'field3') is null as expect_true from test_jsonb where json_type = 'object'; +select (test_json->3) is null as expect_false from test_jsonb where json_type = 'array'; +select (test_json->>3) is null as expect_true from test_jsonb where json_type = 'array'; -- array length SELECT jsonb_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]'); - SELECT jsonb_array_length('[]'); - SELECT jsonb_array_length('{"f1":1,"f2":[5,6]}'); - SELECT jsonb_array_length('4'); -- each