Re: tid_le comparison for tuple id (ctid) values? - Mailing list pgsql-sql

From george young
Subject Re: tid_le comparison for tuple id (ctid) values?
Date
Msg-id 20051121203527.5378122b.gry@ll.mit.edu
Whole thread Raw
In response to Re: tid_le comparison for tuple id (ctid) values?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: tid_le comparison for tuple id (ctid) values?
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: unplanned sub-select error?
Next
From: Hélder M. Vieira
Date:
Subject: Re: max() unexpected type conversion