| От | Tom Lane |
|---|---|
| Тема | Re: Why the "UPDATE tab SET tab.col" is invalid? |
| Дата | |
| Msg-id | 1466.1460036567@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Why the "UPDATE tab SET tab.col" is invalid? ("postgres_sure"<postgres_sure@163.com>) |
| Список | pgsql-hackers |
"postgres_sure"<postgres_sure@163.com> writes:
> I found "Do not include the table's name in the specification of a target column
> — for example, UPDATE tab SET tab.col = 1 is invalid." in the documentation.
> Some people usually like to update table by alias. They want to add this feature.
Sorry, but we aren't ever going to accept such a patch, because it would
introduce an unavoidable ambiguity: is "SET a.b = " meant to be an
assignment to column b of table a, or is it meant to be an assignment to
sub-field b of composite column a?
Yeah, we could invent some resolution rules to deal with that, but
better to just not add the nonstandard syntax (and it IS nonstandard,
SQL:2011 has nothing about it) in the first place.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера