The following bug has been logged on the website:
Bug reference: 6489
Logged by: Rikard Pavelic
Email address: rikard(dot)pavelic(at)zg(dot)htnet(dot)hr
PostgreSQL version: 9.1.2
Operating system: Windows 7
I'm trying to push types in Postgres and have run into some
Currently I'm declaring types and using them in other types and tables as
But types don't support inheritance so I'm thinking about declaring tables
and using it's types instead of just declaring types.
I've run into problems with adding new columns:
create table t1(i int, j int);
create table t2(i int, j t1);
insert into t2 values(1,(2,3));
alter table t1 add x float not null;
This doesn't work:
alter table t1 add x float not null default 0;
It fails with ERROR: cannot alter table "t1" because column "t2.j" uses its
While first alter table will not do as someone would expect (t2.x will be
null) I'm fine with this behavior as it is consistent with types not
allowing not null on attributes.
But I would expect second alter to pass and enforcing not null and default
when adding this column in table and not enforcing not null and default when
adding into composite type for another table.
Is this by design, oversight or a TODO?
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2012-02-26 22:32:53|
|Subject: Re: BUG #6488: Installation instructions slightly wrong. |
|Previous:||From: linehanp||Date: 2012-02-25 10:16:16|
|Subject: BUG #6488: Installation instructions slightly wrong.|