Answer the question
In order to leave comments, you need to log in
How to manually check DB foreign keys?
Hello. I understand that the question may be banal or vague, but the situation is as follows:
There are several database tables that are filled from the client side, the client often messes with the data. tables are linked to others using foreign keys, data is transferred via logical replication to another database (on another server). The problem is that they started to accidentally catch cases when there is a record in the table, but there is no record by the key to which it refers. Is it possible to check the keys of a particular table at once (to find out if there is a record referenced by a key in another table)? Or at least for one specific key? Tell a query. "Shortage" revealed in the process of importing a database dump on another server.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question