Поиск
Список
Период
Сортировка
Искать

От:
Alex 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



Re:

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alex Lau  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

FAQ