[HACKERS] alter table..drop constraint pkey, left not null un-dropped

Поиск
Список
Период
Сортировка
От Rajkumar Raghuwanshi
Тема [HACKERS] alter table..drop constraint pkey, left not null un-dropped
Дата
Msg-id CAKcux6=hiP4aHVuvpcKc1onO43xRqWzA_iw_6Q+Q-P47HN=15g@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] alter table..drop constraint pkey, left not null un-dropped  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Re: [HACKERS] alter table..drop constraint pkey, left not null un-dropped  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi All,

I have created a table with primary key, and then dropped primary key from table. But table still have not null constraint added by primary key.

Is there any other statement to delete primary key with not null?
or this is an expected behaviour of pg?

postgres=# create table tbl (c1 int primary key);
CREATE TABLE
postgres=# \d+ tbl
                                    Table "public.tbl"
 Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description
--------+---------+-----------+----------+---------+---------+--------------+-------------
 c1     | integer |           | not null |         | plain   |              |
Indexes:
    "tbl_pkey" PRIMARY KEY, btree (c1)

postgres=# alter table tbl drop constraint tbl_pkey;
ALTER TABLE
postgres=# \d+ tbl
                                    Table "public.tbl"
 Column |  Type   | Collation | Nullable | Default | Storage | Stats target | Description
--------+---------+-----------+----------+---------+---------+--------------+-------------
 c1     | integer |           | not null |         | plain   |              |


Thanks & Regards,
Rajkumar Raghuwanshi
QMG, EnterpriseDB Corporation

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

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] Get stuck when dropping a subscription duringsynchronizing table
Следующее
От: Marc Mamin
Дата:
Сообщение: [HACKERS] feature wish: filter log_min_duration_statement according to thecontext (parse|bind|execute|...)