From: | ChristophSchmidt <cs(dot)hilzingen(at)swol(dot)de> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: UPDATING and DELETING sub-classes |
Date: | 2000-07-07 05:05:45 |
Message-ID: | 00070707063001.00445@nasen2 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I think you get only the structure of parent in child, nothing more.
parent : a - one column
child : a | b - two column
you have two tables the only benefit of inheritation in this case
is that you have to write less code.
Something similar to Domains.
(I am right ?)
cs
> 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Boszormenyi Laszlo | 2000-07-07 06:45:03 | |
Previous Message | Tom Lane | 2000-07-07 03:48:45 | Re: [Re: UPDATING and DELETING sub-classes ] |