postgresql - get name of violated fk in plpgsgl exception handler -



postgresql - get name of violated fk in plpgsgl exception handler -

i wrote plpgsql function insert info table. inserting table violate 1 of 2 foreign key constraints. can grab exception using "when foreign_key_violation then" how can find out fk violated? there field accessible within plpgsql exception handler containing information?

as of version 9.3 can utilize constraint_name see foreign key has been violated.

details in manual: http://www.postgresql.org/docs/9.3/interactive/plpgsql-control-structures.html

postgresql exception exception-handling plpgsql

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -