PostgreSQL 的 jsonb 列 – 关于 “.” 的问题

huangapple go评论66阅读模式
英文:

PostgresSQL jsonb column - problem with "."

问题

我正在尝试将该值添加到带有jsonb列的表中:

{"prefId": 1, "prefType": "PREF", "date": "23.07.2020"}
但是我遇到了一个错误:

错误:类型json的输入语法无效
详细信息:令牌"."无效。
位置:JSON数据,行1:23.07....
问题是什么,如何解决?

英文:

I'm trying to add the value to my table with a jsonb column:

{"prefId": 1, "prefType": "PREF", "date": "23.07.2020"}

But I'm getting an error:

ERROR: invalid input syntax for type json
  Detail: Token "." is invalid.
  Where: JSON data, line 1: 23.07....

What is the problem and how to solve it?

答案1

得分: 1

日期格式错误。请尝试使用23/07/202023-07-2020

英文:

There is an error in date format. Try 23/07/2020 or 23-07-2020

huangapple
  • 本文由 发表于 2020年7月23日 15:39:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/63049219.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定