tag:blogger.com,1999:blog-12753102.post3163295837526863562..comments2024-03-28T15:41:37.170-04:00Comments on Ben's Journal: Postgres Xid Type ConfusionBen Simonhttp://www.blogger.com/profile/09833753747177544979noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-12753102.post-31715093409341844882009-08-07T14:05:35.785-04:002009-08-07T14:05:35.785-04:00As mentioned in the promising discussion you linke...As mentioned in the promising discussion you linked to, transactions IDs don't allow being ordered by default because of that ordering isn't transitive. For grouping purposes, casting them as text is a prefectly acceptable thing to do--you just need to understand that if you used that text version for ORDER BY, you would not get what you expected.<br /><br />Your function isn't needed though, the two built-in ways to handle this are:<br /><br />transactionid::text<br />text(transactionid)Anonymousnoreply@blogger.com