mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Correctly handle array pseudotypes in to_json and to_jsonb
Columns with array pseudotypes have not been identified as arrays, so they have been rendered as strings in the json and jsonb conversion routines. This change allows them to be rendered as json arrays, making it possible to deal correctly with the anyarray columns in pg_stats.
This commit is contained in:
@ -102,6 +102,12 @@ FROM rows q;
|
||||
|
||||
SELECT row_to_json(row((select array_agg(x) as d from generate_series(5,10) x)),false);
|
||||
|
||||
-- anyarray column
|
||||
|
||||
select to_json(histogram_bounds) histogram_bounds
|
||||
from pg_stats
|
||||
where attname = 'tmplname' and tablename = 'pg_pltemplate';
|
||||
|
||||
-- to_json, timestamps
|
||||
|
||||
select to_json(timestamp '2014-05-28 12:22:35.614298');
|
||||
|
Reference in New Issue
Block a user