KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm inserting a value in table A, that has a serial type as primary key. Using the returned value of the query as a foreign key of table B I get: ERROR: insert or update on table "tb_midia_pessoa" violates foreign key constraint "tb_midia_pessoa_id_pessoa_fkey" DETAIL: Key (id_pessoa)=(30) is not present in table "tb_pessoa" How can I use the returned value of the query as a foreign key of table B without starting a new transaction or dropping my foreign key constraint?
Tags (comma-separated)
Save Edits
Cancel