英文:
postgres pgadmin relation does not exist
问题
我在PostgreSQL中有两个表,product和product2。
我无法查询product2。
查询2运行良好,
查询1和3不运行并显示错误“关系不存在”。
英文:
I have 2 tables in postgres, product and product2
I cannot query product2
query 2 works well,
query 1 and 3 does not run and gives error "relation does not exist"
please help.
答案1
得分: 0
我发现当您查询SELECT * FROM public.PRODUCT2
时,实际上是在查询product2
表(小写)。
就好像在实际运行之前将查询的所有文本转换为小写字符一样。
双引号之间的文本不会转换为小写,所以下面的查询起作用。
SELECT * FROM public."PRODUCT2"
英文:
I found out that when you query SELECT * FROM public.PRODUCT2
, you are actually querying product2
table (with lowercase).
It is like all of the text of your query are converted to lowercase characters before actually run.
The text between double quotes does not converted to lowercase so the below query worked.
SELECT * FROM public."PRODUCT2"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论