[CDBI] Class::DBI patch

Matt S Trout dbix-class at trout.me.uk
Mon Jan 21 04:27:32 GMT 2008


On Fri, Jan 18, 2008 at 12:06:53PM +0100, Rolf Schaufelberger wrote:
> Am Freitag 18 Januar 2008 11:27:07 schrieb Matt S Trout:
> > On Thu, Jan 17, 2008 at 02:18:46PM -0500, Edward J. Sabol wrote:
> > > Veselin Slavov wrote:
> > > > I'm using '*Class::DBI*' in my projects with '*DBD::Pg*' database
> > > > driver. When use some tables like this
> > > > *__PACKAGE__->table('schema_name.table_name');*
> > > > and inserts more than 1 record - inserting failed!
> > > > To simulate this problem please see attached file '*simulate.pl*'.
> > > > I found solution - *Class_DBI.diff* - and think it will be useful for
> > > > other PostgreSQL users also.
> > > >
> > > > I will be very happy if You apply patch in future version of package.
> > >
> > > I probably shouldn't speak for Tony, but I can't imagine him accepting
> > > such a patch. It's very PostgreSQL-specific.
> >
> > No it isn't, it's improving Class::DBI's support for the DBI documented
> > standard approach of getting the last inserted id.
> >
> > Stunningly depressing how bad support in the various DBDs is though;
> > DBD::Pg didn't used to handle it, so DBIx::Class uses a completely
> > different approach (basically "fun with finding sequence names via
> > heuristics" ... don't ask :)
> 
> This is DBIx::Class specific !!

Our sequence guessing isn't, it's just an attempt to play nice with
how SERIAL works.

> But the DBIx::Class approach isn't waterproof as well:

No, it isn't. But this isn't the place for such a conversation - maybe if you
had a think about how you'd like things to work and then posted to the DBIC
list some failing tests for it, we could do something about it.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the ClassDBI mailing list