gpt4 book ai didi

postgresql - 在 Postgres 中对所有打印的 JSONB 使用 jsonb_pretty

转载 作者:行者123 更新时间:2023-11-29 14:13:32 26 4
gpt4 key购买 nike

是否可以配置 .psqlrc 以便将 jsonb_pretty 应用于打印到控制台的每个 JSONB 列?

扩展显示自动模式非常有用:https://stackoverflow.com/a/16108898/1007926

我想同时使用 jsonb_pretty 和扩展显示。 jsonb_pretty 是否通过在字符串中插入换行符来工作?我想如果应用于每个 JSONB select,这会导致问题。

jsonb_pretty: https://www.postgresql.org/docs/current/functions-json.html#FUNCTIONS-JSON-PROCESSING-TABLE

最佳答案

不,这是不可能的。 psql 不支持 JSON 类型的 pretty-print 。

关于postgresql - 在 Postgres 中对所有打印的 JSONB 使用 jsonb_pretty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57086475/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com