In an external application I want to do the following:
- Insert an entry to table A
- Insert a bunch of entries to table B, with the id of my newly inserted item in A as a foreign key
So the tables would look like this:
A(_id, data)
B(_id, other_data)
_id --> A._id
Is this possible to accomplish in only postgresql? Or is it possible to return the id to my application after the item in table A was created, so my application can add the rest of the values?
I've looked at the following post, but it has an incorrect syntax and it causes an infinite loop resulting in a stack overflow (how ironic).