PostgreSQL bytea与字符串互转
2024-11-04 14:31:35 2
假如name是bytea
类型的字段
新增时
INSERT INTO users (name) VALUES ('zhangsan'::bytea)
查询时
SELECT CONVERT_FROM(name, 'UTF-8') AS name FROM users
2024-11-04 14:31:35 2
假如name是bytea
类型的字段
新增时
INSERT INTO users (name) VALUES ('zhangsan'::bytea)
查询时
SELECT CONVERT_FROM(name, 'UTF-8') AS name FROM users