From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Richards <miker(at)scifair(dot)acadiau(dot)ca> |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: [BUGS] Running queries on inherited tables |
Date: | 1999-09-12 17:07:37 |
Message-ID: | 2894.937156057@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-sql |
Michael Richards <miker(at)scifair(dot)acadiau(dot)ca> writes:
> I was fooling with inheritance today. From the page at:
> http://www.postgresql.org/docs/user/inherit.htm
> Here the * after cities indicates that the query should be run over cities
> and all classes below cities in the inheritance hierarchy. Many of the
> commands that we have
> already discussed -- SELECT, UPDATE and DELETE -- support this * notation,
> as do others, like ALTER TABLE.
The doc is wrong here --- UPDATE and DELETE don't support *. They should.
> More playing followed... If I alter table on cities and add a column, is
> it not expected that the additional col should appear in the tables which
> inherit from cities?
You have to say "alter table cities*", I believe, otherwise only cities
is changed. Which is pretty broken --- if inheritance means anything,
then it ought to mean that the alteration is *inherently* applied to all
the child tables too, and you shouldn't have the option. In general,
however, beware that alteration of inheritance structures is pretty
thoroughly broken --- see various complaints in the pghackers archives
(mostly from Chris Bitmead, I think). ALTER TABLE really needs a
reimplementation from the ground up, but I dunno when anyone will get
around to it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Richards | 1999-09-12 18:41:48 | Re: [BUGS] Running queries on inherited tables |
Previous Message | Michael Richards | 1999-09-12 16:41:52 | Running queries on inherited tables |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Richards | 1999-09-12 18:41:48 | Re: [BUGS] Running queries on inherited tables |
Previous Message | Michael Richards | 1999-09-12 16:41:52 | Running queries on inherited tables |