Skip Menu |

This queue is for tickets about the Class-DBI-Loader CPAN distribution.

Report information
The Basics
Id: 5476
Status: resolved
Priority: 0/
Queue: Class-DBI-Loader

People
Owner: Nobody in particular
Requestors: mdi [...] iveyandbrown.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Problem with Primary Keys
Class-DBI-Loader-0.02 This is perl, v5.8.3 built for i386-linux-thread-multi Linux traficant 2.4.24.mdi20040211 #1 Wed Feb 25 14:14:20 CST 2004 i686 GNU/Linux Debian package postgresql-7.4.1-3 ---- I've created a table as per the directions in Class::DBI::Pg, and can access it through Class::DBI::Pg. When I try to use Class::DBI::Loader::Pg, I get: pg_catalog.pg_aggregate has no primary key at /home/ivey/perl/share/perl/5.8.3/Class/DBI/Loader/Pg.pm line 22 I modified Pg.pm to add a break out of the foreach: next if $table =~ m/pg_catalog|information_schema/; and now get: public.organization has no primary key at /home/ivey/perl/share/perl/5.8.3/Class/DBI/Loader/Pg.pm line 23 Am I missing something?
From: Gabriel
[guest - Fri Feb 27 17:44:08 2004]: Show quoted text
> Class-DBI-Loader-0.02 > This is perl, v5.8.3 built for i386-linux-thread-multi > Linux traficant 2.4.24.mdi20040211 #1 Wed Feb 25 14:14:20 CST 2004 > i686 GNU/Linux > Debian package postgresql-7.4.1-3 > ---- > I've created a table as per the directions in Class::DBI::Pg, and can > access it through Class::DBI::Pg. When I try to use > Class::DBI::Loader::Pg, I get: > > pg_catalog.pg_aggregate has no primary key at > /home/ivey/perl/share/perl/5.8.3/Class/DBI/Loader/Pg.pm line 22 > > I modified Pg.pm to add a break out of the foreach: > next if $table =~ m/pg_catalog|information_schema/; > > and now get: > public.organization has no primary key at > /home/ivey/perl/share/perl/5.8.3/Class/DBI/Loader/Pg.pm line 23 > > Am I missing something?
Yes, you're forgetting to take out 'public.' To remedy this I added the following in the _load_classes for loop: $table =~ s/^public\.//g