简体   繁体   中英

how to convert a json format to a jsonb?

我目前正在处理 json 格式的信息,我想将其转换为 jsonb 以更新 postgresql 数据库中的所述信息,但我找不到告诉我如何从 python 中执行此操作的相关信息,我感谢任何评论。

If you have the_table.the_column of type json, you just execute this:

ALTER TABLE the_table ALTER the_column TYPE JSONB;

You can do that from python, perl, psql, whatever. Anything that can send SQL commands.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM