Search Postgresql Archives

Re: inserting to a multi-table view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Shulman wrote:

I want to be able to do INSERTs on "studentinfo" and have rows created
in both "person" and "student".  This requires first inserting into
"person", capturing the "person_id" of the resulting row, and using it
to insert into "student".  This seems as though it must be a common
situation.

Have you considered using table inheritance to solve this?

It has some limitations, and I've never seen the need myself, but it sounds like it might fit your needs.

http://www.postgresql.org/docs/8.3/static/ddl-inherit.html

--
Craig Ringer


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux