Search Postgresql Archives

Re: catch SQLException, error code for Foeign key violation,

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

 





On Mon, 17 Apr 2006, surabhi.ahuja wrote:

The question is that is from this SQLException can i detect if it is a foreign key violation,


You should check the value of SQLException.getSQLState() against this table:
http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html

Kris Jurka


[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