Re: [GENERAL] ERROR: column "id" inherits conflicting default values

2009-10-05 Thread Tom Lane
I wrote: > I guess we're going to have to rewrite that code to not store the cooked > defaults in string form. If they were node trees then equal() would do > the right thing. The attached patch should fix this. regards, tom lane Index: src/backend/commands/tablecmds.c =

Re: [GENERAL] ERROR: column "id" inherits conflicting default values

2009-10-04 Thread Tom Lane
Scott Ribe writes: >> Can you show an actual test case? > create sequence "DbRowIds"; > create table "PatientRelated" (id int8 not null default > nextval('"DbRowIds"')); > create table "Document" (id int8 not null default nextval('"DbRowIds"')); > create table "PatientDocument" () inherits ("

Re: [GENERAL] ERROR: column "id" inherits conflicting default values

2009-10-04 Thread Scott Ribe
> Can you show an actual test case? create sequence "DbRowIds"; create table "PatientRelated" (id int8 not null default nextval('"DbRowIds"')); create table "Document" (id int8 not null default nextval('"DbRowIds"')); create table "PatientDocument" () inherits ("PatientRelated", "Document");

Re: [GENERAL] ERROR: column "id" inherits conflicting default values

2009-10-04 Thread Tom Lane
Scott Ribe 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(

[GENERAL] ERROR: column "id" inherits conflicting default values

2009-10-04 Thread Scott Ribe
In 8.4.1, trying to load a dump from 8.3.5, I get that error from this statement: CREATE TABLE "PatientDocument" ( ) INHERITS ("PatientRelated", "Document"); But I do not see any conflict: # \d "PatientRelated" Table "v2.PatientRelated" Column | Type |