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


I wrote a plpgsql function to insert some data into a table. After putting in the table, I violate one of two foreign key constraints. I can catch the exception using "WHEN foreign_key_violation THEN", but I know how the infringement of FK? Is there an area within the plpgsql exception handler with this information available? According to version 9.3 you can use CONSTRAINT_NAME to see which foreign key was violated.

is.

Details in manual:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -