ActiveRecord :: StatementInvalid异常:PG :: UndefinedFunction:错误:函数jsonb_set(json,unknown,unknown)不存在

时间:2018-06-25 13:17:37

标签: ruby-on-rails postgresql activerecord

我正在使用此查询来更新jsonb字段

UPDATE email_lists SET data = jsonb_set(data, '{aa@rr.com}', '{"email":"aa@rr.com","tnc":"1","add_to_list":"1","country_name":"Mexico","added_at":"2018-06-25"}') WHERE id = '50'

但是收到此错误

  

ActiveRecord :: StatementInvalid异常:PG :: UndefinedFunction:   错误:函数jsonb_set(json,unknown,unknown)不存在

0 个答案:

没有答案