Search Postgresql Archives

What order of steps of the postgres when you change information in the table?

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

 



Problem:
It is necessary to synchronize the "users" table with an
external storage of passwords (krb5)

I made a trigger:
	
CREATE TRIGGER "10_krb5"
  AFTER INSERT OR UPDATE OR DELETE
  ON users
  FOR EACH ROW
  EXECUTE PROCEDURE user2krb5_python();

Everything works, except that when you delete a row from table
"users" foreign keys checking occurs after this trigger. And in case
of any problems with the referencing record is an exception,
rollback is occured (this is ok), but the trigger user2krb5_python() was
executed and the user from the external storage removed.

Checking of foreign keys occurs after the "AFTER-trigger" is ok? Check
of the primary key, unique, and other constraints occurs in the very
beginning, I checked.

	
(sorry for my English)

-- 
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