Re: SQL delete and update at the same time

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: SQL delete and update at the same time
Дата
Msg-id CAHOFxGqgZHZVKKWET1ifMNW24QEbX2zyb9yQDQJk0W266nKmow@mail.gmail.com
обсуждение исходный текст
Ответ на SQL delete and update at the same time  (<paul.malm@lfv.se>)
Ответы SV: SQL delete and update at the same time  (<paul.malm@lfv.se>)
Список pgsql-general
But how can I set the edited vale = 1 on the objects (line segments) that are not deleted (in the current buffer) at the same time so it won’t be deleted in the next run with an adjacent buffer?

You might want to create a temporary table to hold unique identifiers of all records that you want to either delete or edit, and make use of a RETURNING clause to determine which got deleted, then update the records NOT IN that returning clause values (or use EXCEPT). Perhaps that would get you where you want to end up.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Persistent Connections
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Persistent Connections