Re: PostgreSQL equivalent of the Oracale 'unique' qualifier
От | Alexander Staubo |
---|---|
Тема | Re: PostgreSQL equivalent of the Oracale 'unique' qualifier |
Дата | |
Msg-id | 4D1E93C0-17B0-4A29-B463-3917CE380B9A@purefiction.net обсуждение исходный текст |
Ответ на | PostgreSQL equivalent of the Oracale 'unique' qualifier ("Wm.A.Stafford" <stafford@marine.rutgers.edu>) |
Список | pgsql-general |
On Nov 20, 2006, at 21:13 , Wm.A.Stafford wrote: > I hope the subject says it all. I'm porting an Oracle-centric > application to PostgreSQL and the Oracle sql is full of the > 'unique' qualifier. I'm assuming PostgreSQL does not support > 'unique' since don't see a 'unique' anywhere in the PostgreSQL > docs. Is there a substitute or a technique to get the same result? Which documentation? It's in the index: http://www.postgresql.org/docs/8.1/interactive/bookindex.html The entry points here: http://www.postgresql.org/docs/8.1/interactive/ddl- constraints.html#AEN2016 PostgreSQL does ANSI SQL: create table foo (s text unique); create table foo (s text, constraint s_unique unique (s)); alter table foo add constraint s_unique unique (s); And the usual index syntax: create unique index foo_s_index on foo (s); Syntax reference: http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html http://www.postgresql.org/docs/8.1/interactive/sql-createindex.html Alexander.
В списке pgsql-general по дате отправления: