I couldn’t find how to set a xid (transaction ID type) column to be unique in a table. It complains about class method missing for btree and I have no clue how to get around it.
This is using PostgreSQL 9.0.
Couldn’t find any similar question in these forums or on the internet. 🙁
The reason is that there is no
<>operator defined for data typexid(among others). Try:Fails.
You can circumvent this limitation by adding a unique index like this: