关系不存在 [英] Relation does not exist
问题描述
我刚刚通过ODBC将Powerbuilder与PostgreSQL连接起来,但是当我尝试创建数据窗口时出了点问题!我不明白问题出在哪里。收到任何答复,我将非常感谢。
I have just connected Powerbuilder with PostgreSQL through ODBC, but something goes wrong when I'm trying to create a datawindow! I can't understand where is the problem. I will be so grateful to receive any answers.
错误:
The error:
Cannot create DataWindow
SQLSTATE=42P01
ERROR:relation "core sample" does not exist;
No query has been executed with that handle
SELECT CORE_SAMPLE.N_CORE, CORE_SAMPLE.DEPTH,
CORE_SAMPLE.WELL_ID_WELL, CORE_SAMPLE.ID_CORE FROM
CORE_SAM'
推荐答案
显然,这里有一些名称混用。 核心样本
与 CORE_SAMPLE
不同。很难说更多,基于我们在这里拥有的很少的信息。
Obviously, there is a mixup with names. "core sample"
is not the same as CORE_SAMPLE
. Hard to say more, based on what little information we have here.
在PostgreSQL中将未引用的标识符强制转换为小写,因此 CORE_SAMPLE
, Core_Sample
或 core_sample
最终都是相同的。
但是一旦将标识符括在double中用引号引起来,名称保留原样。这样,您可以在名称中包含非法字符,例如空格: core sample
。我的一贯建议是不要使用PostgreSQL格式,而应使用合法的小写标识符。
Unquoted identifiers are cast to lower case in PostgreSQL, so CORE_SAMPLE
, Core_Sample
or core_sample
end up to be identical.
But once you enclose identifiers in double quotes, the name is preserved as is. This way you can have otherwise illegal characters like a space in the name: "core sample"
. My standing advise is to stay away form that and use legal, lower case identifiers exclusively with PostgreSQL.
错误消息告诉您没有名为核心示例
,至少不在您在 search_path
。
但是显示的查询引用了一个名为 CORE_SAMPLE
的表,该表与此错误消息不匹配。
The error message tells you there is no table named "core sample"
, at least not in the database you connected to in any of the schemas listed in the search_path
.
But the displayed query refers to a table named CORE_SAMPLE
which does not match this error message.
这篇关于关系不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!