Search Postgresql Archives

Re: Restore - disable triggers - when they fired?

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

 



Dear Adrian!

2018-03-20 16:33 GMT+01:00 Adrian Klaver <adrian.klaver@xxxxxxxxxxx>:
On 03/20/2018 07:56 AM, Durumdara wrote:

pg_dump --disable-triggers -d test -U aklaver -t disable_trigger_test -a -f disable_trigger_test_data.sql


CREATE OR REPLACE FUNCTION public.trigger_test()
...
truncate disable_trigger_test ;

#Note I do this as a superuser.
psql -d test -U postgres -f disable_trigger_test_data.sql

test=> select * from disable_trigger_test ;
 id | fld_1
----+-------
  1 | dog
  2 | cat


Thank you! Now I got it!
So the difference is:

1.) FULL DB restore into empty database creates the extra objects at the end, so I do not need to worry about triggers.

2.) Partial data restore into an existing database to existing tables with triggers: this point I need to set "disable triggers" option.
 
Very-very thank you!

dd

[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