in reply to Class::DBI::Loader misbehaves (can't find a primary key)

It sounds like a bug - have you tested against other db engines?

Can you post minimal code that reproduces the problem? - I'm happy to test against mysql.

I note that "location" is specified as a non-reserved keyword (iirc) in the postgresql docs.

My guess would be that it's being correctly quoted (as a keyword), but then failing a match later on due to the quotes - perhaps the bug has slipped by because it's only a problem if "location" is the primary key field? Have you tested when "location" is not the primary key?

Tom Melly, tom@tomandlu.co.uk
  • Comment on Re: Class::DBI::Loader misbehaves (can't find a primary key)

Replies are listed 'Best First'.
Re^2: Class::DBI::Loader misbehaves (can't find a primary key)
by blue_cowdawg (Monsignor) on Oct 16, 2006 at 19:59 UTC
        It sounds like a bug - have you tested against other db engines?

    No, I hadn't. I'd actually have to set up MySQL on my development machine and get it running! Also, the schema would have to be modified to use auto_increment instead of the SERIAL types I use for PostgreSQL.

        Can you post minimal code that reproduces the problem? - I'm happy to test against mysql.

    See the first part of my post. I put the Perl code up as well as the definition for the location table. The person table (the one I was actually intersted in populating in this case) couldn't be a simpler table.

    create table person ( person_id SERIAL not null primary key, given_name text not null, surname text not null, email_addr text not null default 'no@email.net' );


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

      Well, if you post minimal code that reproduces the problem, I can try and test it against mysql, if you don't, I can't.

      I can't reconstruct a program that reproduces the problem from snippets, since I don't have postgresql, and therefore have no way of knowing whether such a reconstructed program would trigger the bug or not against postresql - which would make it a pointless exercise.

      Tom Melly, tom@tomandlu.co.uk