From: | Geoffrey Myers <lists(at)serioustechnology(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: disable triggers using psql |
Date: | 2011-02-21 18:53:58 |
Message-ID: | 4D62B4C6.60201@serioustechnology.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
>> I'm not sure how to address this. I'm not exactly sure where to place
>> session_replication_role. It's very close to the top of the file:
>
> Is this a pg_dumpall? A \connect later on will reset the
> session_replication_role. If so, add the SET right after
> the \connect. Alternatively, you could create a special user
> to invoke psql as, which has:
>
> ALTER USER dangerous_bob SET session_replication_role = replica;
>
> Be *very* careful with that account though, as using it for
> anything other than this special case could be very bad.
The saga continues. I've reverted to a multi-step process to try and
figure this out. I create the initial database, then load it from the
command line psql as follows:
pro-# \set session_replication_role replica;
pro-# \o db.out
pro-# \i dump.txt
I still get:
psql:dump.txt:2077301: ERROR: insert or update on table "cust" violates
foreign key constraint "$1"
DETAIL: Key (country,state)=(US,GA) is not present in table "state".
So there's something in the dump that's changing the
session_replication_role?
>
> - --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> End Point Corporation http://www.endpoint.com/
> PGP Key: 0x14964AC8 201102181408
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iEYEAREDAAYFAk1ew9MACgkQvJuQZxSWSshETwCg2oEEicHhokORuQRl3sxkLkpj
> ghIAnRe02LCuyyRlyzvKZ67QCYUyfPzC
> =H9Wb
> -----END PGP SIGNATURE-----
>
>
>
--
Until later, Geoffrey
"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Reed | 2011-02-21 20:06:58 | string_agg hanging? |
Previous Message | salah jubeh | 2011-02-21 15:53:41 | schema Cleanning |