Search Postgresql Archives

Re: disable triggers using psql

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> So I added the on_error_rollback to the script and I get this:
...
> psql:test.sql:12: ERROR:  current transaction is aborted, commands 
> ignored until end of transaction block

That isn't right: are you sure you said ON_ERROR_ROLLBACK? It's 
case-sensitive. Anyway, try this shortened version:

BEGIN;

CREATE TEMP TABLE abc (a INT PRIMARY KEY);

CREATE TEMP TABLE def (b INT NOT NULL REFERENCES abc(a));

SET session_replication_role = replica;

SELECT 'No error:';

INSERT INTO def(b) VALUES (2);

SELECT * FROM def;

ROLLBACK;

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

iEYEAREDAAYFAk1ehJEACgkQvJuQZxSWSsj/5gCgjsQa+nzZz26xQ7c70Bxl5Hs3
AuUAn1uD7MY2BtGR7usl45pC3Yv2pqVS
=mLCm
-----END PGP SIGNATURE-----



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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