PostgreSQL“列"“foo"不存在"其中 foo 是值 [英] PostgreSQL "column "foo" does not exist" where foo is the value

查看:70
本文介绍了PostgreSQL“列"“foo"不存在"其中 foo 是值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 Node 对 Postgres 数据库执行更新查询,但遇到了这个奇怪的问题:

I'm trying to perform an Update query on a Postgres db from Node, and I'm running into this weird issue:

'UPDATE salesforce.Guest__c SET currently_at_property__c = "foo" WHERE rewards_id ='+rewardsId,

我正在尝试将 currently_at_property__c 设置为等于值foo"但由于某种原因我收到此错误:

I'm trying to set the currently_at_property__c equal to the value "foo" but for some reason I'm getting this error:

error: "column "foo" does not exist"

我不知道为什么会这样,因为 foo 是值,而不是列.

I don't know why this is happening, since foo is the value, NOT the column.

推荐答案

正确引用:

    'UPDATE salesforce.Guest__c SET currently_at_property__c = 'foo' WHERE rewards_id ='+rewardsId,

这篇关于PostgreSQL“列"“foo"不存在"其中 foo 是值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆