Checking of deferrable constraints can be postponed until the end of the transaction (using the SET CONSTRAINTS command). A constraint that is not deferrable will be checked immediately after every command. This controls whether you can defer the constraint. Whether deferred constraint judgment is allowed: You can set rules by modifying the constraint definition or set directly in the transaction. Set rules for deferred judgment to determine the constraint at the end of a statement or a transaction. You can specify this feature when creating tables or constraints and modify them later. Deferred constraint judgment is allowed. Therefore, you can avoid dumping failures after creating constraints.Ģ) PostgreSQL allows the deferred detection of constraints. To solve the constraint- and dependency-related problem, PostgreSQL usually adopts the following methods:ġ) When data is imported, constraints are usually created after all the data is written. If both the data types are interdependent, it will be even more difficult to import the data. You must first transfer the dependent data and then transfer the relevant data. It will be very inconvenient to import data if you cannot defer the detection. Is it at the end of the statement or during the insert tuple? Can you defer the constraint detection? Can you defer it until the end of the statement or transaction? Assume that a table has constraints and understand when these constraints are detected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |