Thread: INSERT for inherited tables

INSERT for inherited tables

From
Lewis Bergman
Date:
In the manual in the inherited section there is no mention or an example of
how to do an insert into such a table. It also isn't addressed in the insert
section. Undoubtedly this means everyone else is perfectly clear on the
subject. Alas, I am not.

How would one go about that?
Is it something on the order of
INSERT INTO capitals (state) VALUES ('Wisconson')
WHERE cities.name = 'Madison';
Or can you somehow do the entire insert in one shot?
--
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115

Re: INSERT for inherited tables

From
Tom Lane
Date:
Lewis Bergman <lbergman@[nospam]abi.tconline.net> writes:
> In the manual in the inherited section there is no mention or an example of
> how to do an insert into such a table. It also isn't addressed in the insert
> section. Undoubtedly this means everyone else is perfectly clear on the
> subject. Alas, I am not.

INSERT always inserts into exactly the table you name in the INSERT
command; it doesn't matter whether that table has inheritance children
(or parents).

            regards, tom lane