开发者

Column named parent in postgresql

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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜