Thread: ...

...

From
Alex Lau
Date:
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




Re:

From
Tom Lane
Date:
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