On May 28, 2009, at 12:22 PM, Tom Lane wrote:
> What you need is a test that looks at the SQLSTATE code, and little> if anything else.
Yes, and throws_ok() supports that:
SELECT throws_ok( 'SELECT 1 / 0', '22012' );
Best,
David