No title

Started by Alex Lauabout 24 years ago2 messageshackers
Jump to latest
#1Alex Lau
alex@dpcgroup.com

CREATE TABLE mytesting ( dosnotmatter text );

CREATE INDEX myunique ON mytesting oid;

will this help to make sure the oid is unique? and is that right?
if in fact the oid roll over, and insertation fail. Will reinsert get
an new oid or the same oid retry.
Alex

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Lau (#1)
Re:

Alex Lau <alex@dpcgroup.com> writes:

CREATE TABLE mytesting ( dosnotmatter text );
CREATE INDEX myunique ON mytesting oid;

will this help to make sure the oid is unique?

No, but

CREATE UNIQUE INDEX myunique ON mytesting (oid);

would do the trick.

regards, tom lane