list all keys and types
This commit is contained in:
parent
de2aac8d23
commit
52c696f199
24
reports/key_list.sql
Normal file
24
reports/key_list.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
\timing
|
||||||
|
|
||||||
|
WITH ok AS (
|
||||||
|
SELECT
|
||||||
|
srce,
|
||||||
|
ok.k,
|
||||||
|
jsonb_typeof(allj->ok.k) typeof,
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
tps.trans
|
||||||
|
JOIN LATERAL jsonb_object_keys(allj) ok(k) ON TRUE
|
||||||
|
GROUP BY
|
||||||
|
srce,
|
||||||
|
ok.k,
|
||||||
|
jsonb_typeof(allj->ok.k)
|
||||||
|
ORDER BY
|
||||||
|
srce
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
srce
|
||||||
|
,k
|
||||||
|
,typeof
|
||||||
|
FROM
|
||||||
|
ok
|
Loading…
Reference in New Issue
Block a user