Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread David Pradier
> Please note that the inheritance is not fully set -- if you discover > strange behavior e.g. when altering any of the tables, don't be > surprised. In particular, you should set the attislocal and attinhcount > attributes in pg_attribute for the child tables; also pg_depend entries > are missing

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread David Pradier
Well, it seems very promising ! I think I'll make some tests and do it your way asap. Thanks a lot ! Thanks to everybody else, too. Best regards, David -- [EMAIL PROTECTED] - tel: 01.46.47.21.33 - fax: 01.46.47.21.37 ---(end of broadcast)--- TIP

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Alvaro Herrera
On Tue, May 31, 2005 at 04:53:46PM +0400, Oleg Bartunov wrote: > On Tue, 31 May 2005, Oleg Bartunov wrote: > > >look on pg_inherits table and pg_class.relhassubclass. > >More info http://www.pgsql.ru/db/mw/msg.html?mid=2044343 > > > > example: > > create table t (i int4); > create table t1 (i in

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Oleg Bartunov
On Tue, 31 May 2005, Oleg Bartunov wrote: look on pg_inherits table and pg_class.relhassubclass. More info http://www.pgsql.ru/db/mw/msg.html?mid=2044343 example: create table t (i int4); create table t1 (i int4); create table t2 (i int4); -- mark 't' has children tables update pg_class set

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Oleg Bartunov
look on pg_inherits table and pg_class.relhassubclass. More info http://www.pgsql.ru/db/mw/msg.html?mid=2044343 On Tue, 31 May 2005, Richard Huxton wrote: David Pradier wrote: Hi everybody, is it possible to add some inheritance lively, without doing a dump/restore ? Not AFAIK. Easiest sol

Re: [GENERAL] How to add an INHERITS to an already populated table ?

2005-05-31 Thread Zlatko Matic
Hi. Recently I have tried to do the same thing and I coudn't include inheritence in existing tables. After a half of day of frustration, I have got an idea. I have successfully done it by using EMS PostgreSQL Manager Lite (you can download it from the net). There is an option "Duplicate" in EM

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Richard Huxton
David Pradier wrote: Hi everybody, is it possible to add some inheritance lively, without doing a dump/restore ? Not AFAIK. Easiest solution is probably to script some ALTER TABLE ADD COLUMN commands. -- Richard Huxton Archonet Ltd ---(end of broadcast)-