postgresql 中名为parent 的列
postgresql 是否允许名为“parent”的列?
也不
SELECT id, parent, name FROM address WHERE id=1
给
SELECT id, "parent", name FROM address WHERE id=1
我实际的结果。相反,我得到:
ERROR: column "parent" does not exist
LINE 1: SELECT id, "parent", name FROM address WHERE id=1
^
In statement:
SELECT id, "parent", name FROM address WHERE id=1
该表肯定有一个名为parent 的列。
Does postgresql allow columns named "parent"?
Neither
SELECT id, parent, name FROM address WHERE id=1
nor
SELECT id, "parent", name FROM address WHERE id=1
give me an actual result. Instead I get:
ERROR: column "parent" does not exist
LINE 1: SELECT id, "parent", name FROM address WHERE id=1
^
In statement:
SELECT id, "parent", name FROM address WHERE id=1
The table very certainly has a column called parent.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“parent”一词似乎不是关键字 在 postgresql 中,所以还有其他问题。
当用双引号引起来列名称时,列名称将区分大小写。你能发布“\d地址”的输出吗?这将有助于诊断问题。
The word "parent" does not appear to be a keyword in postgresql so something else is the issue.
When you surround the column name with double-quotes, the column name becomes case sensitive. Can you post the output of "\d address"? This would be helpful in diagnosing the issue.
这实际上是相当阴险的。没有任何问题。整个问题是 APC 缓存保留了它不应该保留的东西。很抱歉造成混乱。
It was actually quite insidious. There was nothing wrong with anything. The whole issue was the APC cache holding onto something it shouldn't have. Sorry about the confusion.