The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

postgresql: split a table

I'd like to split a table into 2 different tables. I want to link them using the primary key. For example: primary key in table1 will link to primary key in table 2. I believe I would setup some kind of foreign key for this. I'm wondering how I can have the system automatically create the record in table2 when a record is added in table1. (it would be a 1 to 1 relationship)