Обсуждение: ...

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

...

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