Observed an issue in CREATE TABLE syntax

Поиск
Список
Период
Сортировка
От Rajeev rastogi
Тема Observed an issue in CREATE TABLE syntax
Дата
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7713DDDEBC5@SZXEML508-MBX.china.huawei.com
обсуждение исходный текст
Ответы Re: Observed an issue in CREATE TABLE syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

I observed an issue that even if invalid syntax is provided for CREATE TABLE, table is getting created successfully.

               

                Below table creation succeed even though same constraint name is given multiple times.

                None of the below constraints has any meaning of giving multiple times.

 

                postgres=# create table new (id int NULL NULL);

CREATE TABLE

 

postgres=# create table new1(id serial NOT NULL NOT NULL);

CREATE TABLE

 

postgres=# create table new2 (id int unique unique);

CREATE TABLE  

 

Should we not throw error for above syntaxes?

 

Please find the attached patch with the fix.

 

Thanks and Regards,

Kumar Rajeev Rastogi

 

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: WAL format and API changes (9.5)
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)