Re: ERROR: column "id" inherits conflicting default values - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: column "id" inherits conflicting default values
Date
Msg-id 16891.1254706981@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: column "id" inherits conflicting default values  (Scott Ribe <scott_ribe@killerbytes.com>)
Responses Re: ERROR: column "id" inherits conflicting default values
List pgsql-general
Scott Ribe <scott_ribe@killerbytes.com> writes:
> Should I really have to re-specify the default in this case???

Works for me:

regression=# create sequence s1;
CREATE SEQUENCE
regression=# create table t1 (f1 bigint default nextval('s1'::text::regclass));
CREATE TABLE
regression=# create table t2 (f1 bigint default nextval('s1'::text::regclass));
CREATE TABLE
regression=# create table t3 (f2 int) inherits(t1,t2);
NOTICE:  merging multiple inherited definitions of column "f1"
CREATE TABLE
regression=# \d t3
                     Table "public.t3"
 Column |  Type   |                Modifiers
--------+---------+-----------------------------------------
 f1     | bigint  | default nextval(('s1'::text)::regclass)
 f2     | integer |
Inherits: t1,
          t2


Can you show an actual test case?

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: ERROR: column "id" inherits conflicting default values
Next
From: Scott Ribe
Date:
Subject: Re: ERROR: column "id" inherits conflicting default values