更新时间:2022-06-09 00:03:01
你有两个选择:
- 没有引号:那么一切将自动为小写和不区分大小写
- 带引号:从现在起,一切都是区分大小写的。
you have two choices: - no quotes: then everything will automatically be lowercase and non-case-sensitive - with quotes: from now on everything is case sensitive.
我强烈建议不要使用引号,使PostgreSQL行为不区分大小写。它使生活那么容易。一旦你得到报价,你就得使用它,因为PostgreSQL将开始非常精确。
i would highly recommend to NOT use quotes and make PostgreSQL behave non case sensitive. it makes life so much easier. once you get into quoting you got to use it EVERYWHERE as PostgreSQL will start to be very precise.
一些例子:
TEST = test <-- non case sensitive
"Test" <> Test <-- first is precise, second one is turned to lower case
"Test" = "Test" <-- will work
"test" = TEST <-- should work; but you are just lucky.
真的尽量避免这种骗术。保持对象名称的7位ascii。
really try to avoid this kind of trickery at any cost. stay with 7 bit ascii for object names.