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

From: george young <gry(at)ll(dot)mit(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: tid_le comparison for tuple id (ctid) values?
Date: 2005-11-22 01:35:27
Message-ID: 20051121203527.5378122b.gry@ll.mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 21 Nov 2005 16:19:28 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> threw this fish to the penguins:

> george young <gry(at)ll(dot)mit(dot)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)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Hélder M. Vieira 2005-11-22 01:40:00 Re: max() unexpected type conversion
Previous Message Tom Lane 2005-11-22 01:10:54 Re: unplanned sub-select error?