要保存到postgres过程中会出现data读取数据混乱,不是原来的数据
解决办法:修改postgres的postgresql.conf配置文件
bytea_output = 'escape' # hex, escape
或者
ALTER DATABASE database_name SET bytea_output TO 'escape';
意思是设置bytea_output的输出类型设置为转义类型输出,而postgres默认是hex类型输出,所以导致转换数据混乱问题
解决办法:修改postgres的postgresql.conf配置文件
bytea_output = 'escape' # hex, escape
或者
ALTER DATABASE database_name SET bytea_output TO 'escape';
意思是设置bytea_output的输出类型设置为转义类型输出,而postgres默认是hex类型输出,所以导致转换数据混乱问题
本文介绍了解决Postgres数据库中由于默认的hex输出格式导致的数据混乱问题。通过修改postgresql.conf配置文件中的bytea_output参数为转义类型输出,可以确保数据的正确性和一致性。
611

被折叠的 条评论
为什么被折叠?



