当前位置:网站首页>PostgreSQL stepping on the pit | error: operator does not exist: UUID = character varying
PostgreSQL stepping on the pit | error: operator does not exist: UUID = character varying
2022-07-25 11:18:00 【Panic L】
Business scenario :
stay MyBatis Chinese vs Postgresql Database table data update operation , Report the following error :
Caused by: org.postgresql.util.PSQLException: ERROR: column “data” is of type jsonb but expression is of type character varying
Suggest :You will need to rewrite or cast the expression.
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid = character varying
Suggest :No operator matches the given name and argument types. You might need to add explicit type casts.
reason :
because Postgresql The data type of the database is the same as MySQL atypism , Lead to habitual thinking in MyBatis Write in database sql sentence , Result in an error . The reason is actually the same , Is the data type of the accepted parameter and Postgresql Inconsistency of database .
I am here. uuid and data Namely uuid The type and jsonb type , Here's the picture :
then MyBatis Medium sql as follows :
This is the scene .
resolvent :
Add the corresponding type conversion after each type , Such as uuid The type and jsonb, Add :: type Such a format is sufficient , as follows :
thus , Problem solving !
边栏推荐
- Flask framework - session and cookies
- Flask framework -- flask caching
- [flask advanced] solve the classic error reporting of flask by combining the source code: working outside of application context
- SQL语言(五)
- Learn NLP with Transformer (Chapter 8)
- Nb-iot control LCD (date setting and reading)
- The B2B2C multi merchant system has rich functions and is very easy to open!!!
- Nowcodertop12-16 - continuous updating
- 大佬们,flink cdc table api , mysql to mysql,一个应用程序,可以
- 数字孪生万物可视 | 联接现实世界与数字空间
猜你喜欢

【flask高级】结合源码详解flask的运行机制(出入栈)

推荐系统-协同过滤在Spark中的实现

NowCoderTOP1-6——持续更新ing

从开源的视角,解析SAP经典ERP “三十年不用变”的架构设计

The most detailed MySQL index analysis (mind map is attached at the end of the article)

ArcMap无法启动解决方法

Shell 脚本参数传递时有 \r 换行符问题

SQL语言(四)

我,AI博士生,在线众筹研究主题

I, AI doctoral student, online crowdfunding research topic
随机推荐
让运动自然发生,FITURE打造全新生活方式
哥廷根大学提出CLIPSeg:一个使用文本和图像prompt能同时作三个分割任务的模型
[high concurrency] how to realize distributed flow restriction under 100 million level traffic? You must master these theories!!
Flask framework - Message flash
信息熵的定义
游戏背包系统,“Inventory Pro插件”,研究学习-----妈妈再也不用担心我不会做背包了(Unity3D)
Nowcodertop1-6 - continuous updating
SQL语言(四)
[cloud enjoys freshness] community weekly · Vol 72 - the first opening ceremony of the 2022 Huawei developer competition in China was launched; Huawei cloud koomessage is in hot public beta
MySQL | GROUP_CONCAT函数,将某一列的值用逗号拼接
tensorflow 调用多块GPU的一些错误
Hcip experiment (04)
HCIP (01)
HDD杭州站全程体验有感
为什么重写equals()方法必须要重写hashCode()方法
[information system project manager] thought map series essence summary
Redis sentry, high availability executor
ESP8266 使用 DRV8833驱动板驱动N20电机
【域泛化】2022 IJCAI领域泛化教程报告
最详细的mysql索引解析(文末附赠思维导图)