Re: disable triggers using psql - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: disable triggers using psql
Date
Msg-id c2fbc62456ce605e4daf33b76fcd274e@biglumber.com
Whole thread Raw
In response to Re: disable triggers using psql  (Geoffrey Myers <lists@serioustechnology.com>)
Responses Re: disable triggers using psql
Re: disable triggers using psql
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


>>> set local session_replication_role = replica;
>>>
>>> But that does not seem provide the expected relief.
>>
>> How exactly did this fail? This should absolutely disable all
>> triggers for you, unless you've mucked with the triggers
>> and set them to replica.

> I received the following error:
>
> ERROR:  insert or update on table "customer" violates foreign key
> constraint "$1"

Try removing the 'local'; you may be spanning multiple transactions.
If this is a script you are feeding directly to psql, you can
also add a BEGIN; at the top or just use the -1 argument.

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201102171551
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk1diwUACgkQvJuQZxSWSshcPgCdGuHIe4bINl/BmoKW89YmQscD
IdAAnA8bwbzmMKssCga9G0dpSh1GopzD
=khQx
-----END PGP SIGNATURE-----



pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: find column name that has under score (_)
Next
From: Geoffrey Myers
Date:
Subject: Re: disable triggers using psql