Re: ERROR: column "id" inherits conflicting default values
| От | Tom Lane |
|---|---|
| Тема | Re: ERROR: column "id" inherits conflicting default values |
| Дата | |
| Msg-id | 16891.1254706981@sss.pgh.pa.us обсуждение |
| Ответ на | ERROR: column "id" inherits conflicting default values (Scott Ribe <scott_ribe@killerbytes.com>) |
| Ответы |
Re: ERROR: column "id" inherits conflicting default values
|
| Список | 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 по дате отправления: