Re: tid_le comparison for tuple id (ctid) values?

Поиск
Список
Период
Сортировка
От george young
Тема Re: tid_le comparison for tuple id (ctid) values?
Дата
Msg-id 20051121203527.5378122b.gry@ll.mit.edu
обсуждение исходный текст
Ответ на Re: tid_le comparison for tuple id (ctid) values?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: tid_le comparison for tuple id (ctid) values?  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
On Mon, 21 Nov 2005 16:19:28 -0500
Tom Lane <tgl@sss.pgh.pa.us> threw this fish to the penguins:

> george young <gry@ll.mit.edu> writes:
> >    update steps set x=x||'X' from steps s where steps.key1=s.key1 and steps.key2=s.key2 and step.ctid<s.ctid;
> 
> > But this fails because there is no less-than operator (or function) on
> > type "tid".
> 
> Probably a good thing, too, since if there was it wouldn't have anything
> reliable to do with the age of the tuple.

Well, I don't have any need for it to correlate with the age of the
tuple.  My use of step.ctid<s.ctid was not to get the earliest or
latest row, but just to *choose* one.  Perhaps there's some other
query that would modify only one of each pair of equal-keyed rows?

-- George
-- 
"Are the gods not just?"  "Oh no, child.
What would become of us if they were?" (CSL)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unplanned sub-select error?
Следующее
От: Hélder M. Vieira
Дата:
Сообщение: Re: max() unexpected type conversion