On Nov 3, 2010, at 2:06 PM, Alex Hunsaker wrote:
>> try:
>> plpy.execute("insert into foo values(1)")
>> except plpy.UniqueViolation, e:
>> plpy.notice("Ooops, you got yourself a SQLSTATE %d", e.sqlstate)
>
> Ouuu <googly eyes>.
>
> [ now that eval { }, thanks to Tim Bunce, works with plperl it should
> be possible to do something similar there as well. Just noting the
> possibility... not volunteering :) ]
/me wants a global $dbh that mimics the DBI interface but just uses SPI under the hood. Not volunteering, either…
David