Project

General

Profile

« Previous | Next » 

Revision 10164

lib/sql_io.py: put_table() (column-based import): warning about triggers populating unique constraint-covered columns: corrected limitation to include only the unique constraint used to do the DISTINCT ON, since other unique constraints are not affected by column-based import. note that the primary key will normally not be the DISTINCT ON constraint, so trigger-populated natural keys are supported unless the input table contains duplicate rows for some generated keys.

View differences:

lib/sql_io.py
346 346
    Only works under PostgreSQL (uses INSERT RETURNING).
347 347
    
348 348
    Warning: This function's normalizing algorithm does not support database
349
    triggers that populate fields covered by a unique constraint. Such fields
350
    must be populated by the mappings instead.
351
    (Other fields are not affected by this restriction on triggers.)
349
    triggers that populate fields covered by the unique constraint used to do
350
    the DISTINCT ON. Such fields must be populated by the mappings instead.
351
    (Other unique constraints and other non-unique fields are not affected by
352
    this restriction on triggers. Note that the primary key will normally not be
353
    the DISTINCT ON constraint, so trigger-populated natural keys are supported
354
    *unless* the input table contains duplicate rows for some generated keys.)
352 355
    
353 356
    Note that much of the complexity of the normalizing algorithm is due to
354 357
    PostgreSQL (and other DB systems) not having a native command for

Also available in: Unified diff