Re: ERROR: column "id" inherits conflicting default values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: column "id" inherits conflicting default values
Date: 2009-10-05 01:43:01
Message-ID: 16891.1254706981@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Ribe <scott_ribe(at)killerbytes(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2009-10-05 02:06:42 Re: ERROR: column "id" inherits conflicting default values
Previous Message Scott Ribe 2009-10-05 01:27:45 ERROR: column "id" inherits conflicting default values