git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 075df6b) | patch
Add hint about not qualifying UPDATE...SET target with relation name.
2024年1月20日 22:54:14 +0000 (17:54 -0500)
2024年1月20日 22:54:14 +0000 (17:54 -0500)
commit 58447e31890ace0d552a4bf693744bef3a5335e6
Add hint about not qualifying UPDATE...SET target with relation name.

Target columns in UPDATE ... SET must not be qualified with the target
table; we disallow this because it'd create ambiguity about which name
is the column name in case of field-qualified names. However, newbies
have been seen to expect that they could qualify a target name just
like other names. The error message when they do is confusing:
"column "foo" of relation "foo" does not exist". To improve matters,
issue a HINT if the invalid name is qualified and matches the
relation's alias.

James Coleman (editorialized a bit by me)

Discussion: https://postgr.es/m/CAAaqYe8S2Qa060UV-YF5GoSd5PkEhLV94x-fEi3=TOtpaXCV+w@mail.gmail.com
src/backend/parser/analyze.c diff | blob | blame | history
src/test/regress/expected/insert_conflict.out diff | blob | blame | history
src/test/regress/expected/update.out diff | blob | blame | history
src/test/regress/sql/insert_conflict.sql diff | blob | blame | history
src/test/regress/sql/update.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /