UPDATING and DELETING sub-classes

Поиск
Список
Период
Сортировка
От Ami Ganguli
Тема UPDATING and DELETING sub-classes
Дата
Msg-id 20000706164841.17678.qmail@pb151.postoffice.net
обсуждение исходный текст
Ответы Re: UPDATING and DELETING sub-classes  (Tom Lane <tgl@sss.pgh.pa.us>)
...  (Boszormenyi Laszlo <gcs@jupiter.hlab.uni-miskolc.hu>)
Список pgsql-novice
I've tried posting this to pgsql-bugs with no response, so I thought I'd try
here (in case there's something silly I'm doing wrong).

I'm trying to use the DELETE and UPDATE commands to update both the parent
class (which is specfied in the query) and the sub-classes.  According to the
documentation the default behaviour is to include sub-classes and that's
exactly what I want.  Unfortunately it doesn't work:

If I do this:

create table parent ( a int );
create table child ( b int ) inherits (parent);
insert into child values ( 1, 2 );
update parent set a=3 where a=1;

The update does nothing.  I would expect it to update the record in the child
table.

What am I doing wrong?  If this is a bug, is there a workaround?

Thanks,
Ami.


В списке pgsql-novice по дате отправления:

Предыдущее
От: ChristophSchmidt
Дата:
Сообщение: Re: newbie problem on creating table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UPDATING and DELETING sub-classes