Skip site navigation (1) Skip section navigation (2)

Re: plperl error format vs plpgsql error format vs pgTAP

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Field <kevinjamesfield(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: plperl error format vs plpgsql error format vs pgTAP
Date: 2009-05-28 21:18:12
Message-ID: 0739180E-7418-465F-9263-1F16C346B6F4@kineticode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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

In response to

pgsql-hackers by date

Next:From: David E. WheelerDate: 2009-05-28 21:19:10
Subject: Re: plperl error format vs plpgsql error format vs pgTAP
Previous:From: Tom LaneDate: 2009-05-28 21:15:44
Subject: Re: plperl error format vs plpgsql error format vs pgTAP

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group