[Catalyst] Weird -d flag and txn_do interaction...
Matt S Trout
dbix-class at trout.me.uk
Mon Sep 3 19:47:27 GMT 2007
On Mon, Aug 27, 2007 at 05:10:23PM +0200, Marcello Romani wrote:
> Hi,
> I'm developing an app using cat and dbic, with postgresql 8.1.
> I've got a table with a "unique" column.
>
> When I try to insert a record that violates that constraint (the code is
> executed via txn_do($coderef)), I obviously get an exception from DBIC.
>
> The problem is that if I run myapp_server without the -d flag, the
> exception string is correct; but if I run it _with_ the -d flag istead,
> the error gets cleared by a SELECT(*) COUNT executed with apparently no
> reason after the failing INSERT() query.
> Therefore the error string I get is something like "command ignored
> until end of transaction block."
Something's numifying the $rs thus causing ->count to be called.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/
More information about the Catalyst
mailing list