""Ilja Golshtein"" <ilejn@xxxxxxxxx> wrote in message news:430B2C5D.000008.17678@xxxxxxxxxxxxxxxxxxxx > Hello! > >>On Tue, Aug 23, 2005 at 09:15:42AM -0400, Robert Treat wrote: >>> On Tuesday 23 August 2005 08:39, Ilja Golshtein wrote: >>> > >>> > select ctid from aaa where ctid in (select ctid from aaa limit 10); > >>Aside from that, ctid is of type tid, and its equality operator >>isn't hashable. > > It is the piece of knowledge I failed to deduce exploring > plans of queries ;(. > > So I have no better solution then creating indexed > field of serial type, have I? > > The only thing I am curios is ctid good for > anything from user point of view? The ctid value can be useful in a multi user application, to check whether a record has been changed by another user, before committing changes. Whenever a record is updated the ctid value will be changed, so by storing the ctid value when first fetching the record, that can be compared with the current ctid value before doing the update. > > Thanks a lot. > > -- > Best regards > Ilja Golshtein > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly