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/ _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/