Subject: | DBD::Pg fails in fetch_id if a prefix is in use |
Date: | Mon, 22 Dec 2008 12:59:23 -0800 |
To: | bug-Data-ObjectDriver [...] rt.cpan.org |
From: | Max Kanat-Alexander <mkanat [...] bugzilla.org> |
I'm using TheSchwartz. I have a prefix of "ts_" on my
TheSchwartz tables. Everything works fine with the mysql driver, but
when I switch to the Pg driver, I get the following traceback:
DBD::Pg::db last_insert_id failed: ERROR: relation "job_jobid_seq" does not exist at lib/Data/ObjectDriver/Driver/DBD/Pg.pm line 38.
at lib/Data/ObjectDriver/Driver/DBD/Pg.pm line 38
Data::ObjectDriver::Driver::DBD::Pg::fetch_id('Data::ObjectDriver::Driver::DBD::Pg=HASH(0x9efc9b0)', 'TheSchwartz::Job', 'DBI::db=HASH(0x9f10874)', 'DBI::st=HASH(0x9f10bbc)') called at lib/Data/ObjectDriver/Driver/DBI.pm line 342
Data::ObjectDriver::Driver::DBI::_insert_or_replace('Data::ObjectDriver::Driver::DBI=HASH(0x9efcf50)', 'TheSchwartz::Job=HASH(0x9dbadf4)', 'HASH(0x9f08120)') called at lib/Data/ObjectDriver/Driver/DBI.pm line 278
Data::ObjectDriver::Driver::DBI::insert('Data::ObjectDriver::Driver::DBI=HASH(0x9efcf50)', 'TheSchwartz::Job=HASH(0x9dbadf4)') called at lib/TheSchwartz.pm line 364
TheSchwartz::insert_job_to_driver('Bugzilla::JobQueue=ARRAY(0x9f71448)', 'TheSchwartz::Job=HASH(0x9dbadf4)', 'Data::ObjectDriver::Driver::DBI=HASH(0x9efcf50)', '4b17e1b45d13c00689cf59d47817f877') called at lib/TheSchwartz.pm line 436
TheSchwartz::insert('Bugzilla::JobQueue=ARRAY(0x9f71448)', 'Bugzilla::Job::Mailer', 'HASH(0x9efc95c)')
As you can see, it's using "job" as the prefix
for the sequence, when "ts_job" should be the prefix.