Re: Wrong note in the information schema section?

Поиск
Список
Период
Сортировка
Искать
От
Daniel Westermann (DWE)
Тема
Re: Wrong note in the information schema section?
Дата
Msg-id
ZR0P278MB0920FFE2427CAE3BCD6DC7F0D2CC9@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM
Ответ на
Список
Дерево обсуждения
Wrong note in the information schema section? "Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>
Re: Wrong note in the information schema section? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Wrong note in the information schema section? "Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>
Wrong note in the information schema section? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Wrong note in the information schema section? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Wrong note in the information schema section? Pantelis Theodosiou <ypercube@gmail.com>
Re: Wrong note in the information schema section? Pantelis Theodosiou <ypercube@gmail.com>
Re: Wrong note in the information schema section? "Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>

 
On Monday, August 30, 2021, David G. Johnston  wrote:
On Monday, August 30, 2021, Daniel Westermann (DWE)  wrote:

>>>Practically speaking there must be some level of scope where a duplicate name error can occur.  All the docs say is that the schema >>>scope is not it.  You've demonstrated that it is the table scope where duplication of names is detected.

>>Thanks, David. The sentence above is still misleading, at least according to my understanding.

>Create a second table and add a constraint of the same name to it.
 

>And your error is actually because the name of the unique index backing the constraint is a problem, not the name of the constraint >itself.  Try naming a check constraint.

Thanks, now it makes sense:

postgres=# create table t1 ( a int );
CREATE TABLE
postgres=# create table t2 ( a int );
CREATE TABLE
postgres=# alter table t1 add constraint chk1 check ( a > 1 );
ALTER TABLE
postgres=# alter table t2 add constraint chk1 check ( a > 1 );


Regards
Daniel

В списке pgsql-docs по дате отправления
От: Pantelis Theodosiou
Дата:
От: Pantelis Theodosiou
Дата:
FAQ