| От | Tom Lane |
|---|---|
| Тема | Re: Information Schema and constraint names not unique |
| Дата | |
| Msg-id | 28745.1068217520@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Information Schema and constraint names not unique (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Ответы |
Re: Information Schema and constraint names not unique
|
| Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> regression=# create table foo (f1 int check (f1 > 0) check (f1 < 10));
>> ERROR: check constraint "foo_f1" already exists
> Is this a TODO to fix?
Probably should be. I'd be inclined to try to fix it by generating
"foo_f1_1", "foo_f1_2", etc until a non-conflicting name is found.
(Note: the reason it's okay to search for a non-conflicting name in this
context is we only need a lock on the single table in question. It's
no problem anyway in CREATE TABLE, but can still work in ALTER TABLE.)
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера