Re: Duplicate Key Values
От | Adrian Klaver |
---|---|
Тема | Re: Duplicate Key Values |
Дата | |
Msg-id | b63d28ca-d3be-4701-8752-3ee939133165@aklaver.com обсуждение исходный текст |
Ответ на | Re: Duplicate Key Values (mark bradley <markbradyju@outlook.com>) |
Ответы |
Re: Duplicate Key Values
Re: Duplicate Key Values |
Список | pgsql-general |
On 3/13/25 08:56, mark bradley wrote: > >Postgresql does not assume / default to inheritance. In text-mode > clients where you type >in "raw" SQL, you have to explicitly add an > explicit "INHERITS <parent_table>" clause to the >"CREATE TABLE foo" > statement. > > >Are you creating the tables via PgAdmin point-and-click? > > I am using PgAdmin 4 v9.1. > > I think the problem may also be related to the fact that I had > *node_id* and *node_type *were in both tables from an earlier design and > Postgres would not let me delete* node_type* from the* dataset* table. Because it was inherited: create table node (node_id integer primary key, fld1 varchar); create table node_1 (node_id integer primary key, node_1_fld boolean) inherits ( node); alter table node_1 drop column fld1; ERROR: cannot drop inherited column "fld1" > > As an experiment, I created a simple version of the same tables from > scratch without *node_type* in the *dataset* table. So far, no dups are > appearing. I'm assuming that by 'simple version' you mean no inheritance. > > Best regards, > Mark Brady > _amazon.com/author/markjbrady <https://amazon.com/author/markjbrady>_ > ------------------------------------------------------------------------ -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: