Search Postgresql Archives

Re: How to replace rows in table so that foreign key rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  I did so, and for a table named 'country' the following SQL statements 
> were produced:
>
> -- Disable triggers
> UPDATE pg_catalog.pg_class SET reltriggers = 0 WHERE oid = 
> 'country'::pg_catalog.regclass;
>
> /* COPY command goes here to bulk load table data. */
>
> -- Enable triggers
> UPDATE pg_catalog.pg_class SET reltriggers = (SELECT pg_catalog.count(*) 
> FROM pg_catalog.pg_trigger where pg_class.oid = tgrelid) WHERE oid = 
> 'country'::pg_catalog.regclass;

Berend,

thank you for bright idea.
this may cause invalid foreign key data to be loaded into database.

I want that in end of transaction Postgres will check for correctness of 
foreign keys like DEFERRED clause suggests.
How this check can be forced ?

Andrus. 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux