| От | Tom Lane |
|---|---|
| Тема | Re: update returning order by syntax error question |
| Дата | |
| Msg-id | 19619.1568299095@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: update returning order by syntax error question (Adrian Klaver <adrian.klaver@aklaver.com>) |
| Список | pgsql-general |
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 9/12/19 6:44 AM, Tom Lane wrote:
>> No, it's *exactly* as if that. UPDATE is an unreserved
>> keyword so it's fully legitimate as a table name.
> I am not following.
Sure, the WITH thing works too. The point is that given
"SELECT ... FROM (UPDATE ...)", there is a workable parse
path where UPDATE is treated as a table name. So if you
try to put an UPDATE command there, the syntax error
isn't thrown till a couple tokens later, where the
table-name syntax no longer matches. The OP's question
was about why the error was thrown where it was, not about
how to do this correctly.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера