Re: How to write such a query

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: How to write such a query
Дата
Msg-id 270c56f5-c305-9a99-5e14-59b89e2d1057@aklaver.com
обсуждение исходный текст
Ответ на Re: How to write such a query  (Jonathan Strong <jonathanrstrong@gmail.com>)
Ответы Re: How to write such a query  (Jonathan Strong <jonathanrstrong@gmail.com>)
Список pgsql-general
On 9/18/20 11:13 AM, Jonathan Strong wrote:
> @Adrian -
> 
> Using a unique key value or otherwise isolating a specific record via 
> selection against values in its attributes is certainly preferable to 
> choosing a row to update via its position in a result set, unless the 
> use case actually makes use of that position info as a meaningful 
> descriptor of the data in some fashion.


The bigger issue is deciding what attribute of the selected row is be 
used to do the UPDATE. Unless it is the PRIMARY KEY(or other UNIQUE 
key(s)) then you very likely are going to UPDATE more then you bargained 
for.

> 
> - Jon
> 
> <https://www.linkedin.com/in/jonstrong/> <https://www.jonathanrstrong.com>
> 
>     
> 
> *Jonathan Strong*
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: How to write such a query
Следующее
От: Jonathan Strong
Дата:
Сообщение: Re: How to write such a query