updating derived classes - Mailing list pgsql-bugs

From Ami Ganguli
Subject updating derived classes
Date
Msg-id 20000705041808.3000.qmail@pb151.postoffice.net
Whole thread Raw
List pgsql-bugs
=========================================================================
                         POSTGRESQL BUG REPORT TEMPLATE
 ========================================================================


Your name               : Ami Ganguli
Your email address      : ami@ganguli.com


System Configuration
---------------------
  Architecture (example: Intel Pentium)         : AMD Athlon

  Operating System (example: Linux 2.0.26 ELF)  : Linux 2.2.16 ELF

  PostgreSQL version (example: PostgreSQL-6.5.1):   PostgreSQL-7.0.2

  Compiler used (example:  gcc 2.8.0)           : not sure (from RPM)


Please enter a FULL description of your problem:
------------------------------------------------

When UPDATING a table that has derived classes the documentation states that
the plain UPDATE command should update all the derived classes as well.
(UPDATE ONLY would update only the specified class.)  This doesn't seem to
work and I can't figure out how to update both all the derived classes without
copious amounts of code.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

tester=# create table parent ( a int );
CREATE
tester=# create table child ( b int ) inherits ( parent );
CREATE
tester=# insert into child values ( 1, 2 );
INSERT 19253 1
tester=# select * from parent*;
 a
---
 1
(1 row)

tester=# update parent set a=2;
UPDATE 0
tester=# update parent* set a=2;
ERROR:  parser: parse error at or near "*"



If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Thanks for any help with this.  I can work around the problem, but the
resulting code would be quite unweildy and a bear to maintain.  Is there a
clean workaround?

... Ami.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug: Contrib\fulltextindex\fti.c?
Next
From: Reinhard Max
Date:
Subject: Patch for Linux-IA64