Confused and needing help on error: "access" has no primary key

------=_NextPart_000_001E_01C77DDA.7C1B87B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

DBI users,

I=92ve recently taken on a project of moving a large Perl =
based
application from one server to another. In the process of setting =
things up
I=92ve come across this error message which I do not know how to handle. =
Over
the last 48 hours I=92ve checked the mail list archive at google, =
checked the
search engines (google, yahoo, live), read some docs (perldoc DBI, =
perldoc
DBI::Pg), and couldn=92t get the FAQ to load. If someone could shed =
some
light on this matter I would greatly appreciate it.



The error message (found in the Apache web server error_log file) is:



index.cgi: "access" has no primary key at
/usr/lib/perl5/site_perl/5.8.8/Class/DBI/Loader/Generic.pm line 166



This seems odd since the table =93access=94 does have a primary key as =
evidenced
by the following PostgreSQL psql command:







mydb=3D> \d access

Table "public.access"

Column | Type |
Modifiers

-------------------------+-----------------------------+---- -------------=
---
---------------------------------

id | integer | not null =
default
nextval('access_id_seq'::regclass)

login_attempt_id | integer | not null

access_time | timestamp without time zone |

http_user_agent_type_id | integer | not null

ip | inet |

url | character varying |

Indexes:

"access_pkey" PRIMARY KEY, btree (id)

Foreign-key constraints:

"$1" FOREIGN KEY (login_attempt_id) REFERENCES login_attempt(id)

"$2" FOREIGN KEY (http_user_agent_type_id) REFERENCES
http_user_agent_type(id)







Some details about the system that I=92m running on are:



# psql --version

psql (PostgreSQL) 8.1.8

contains support for command-line editing





# perldoc perllocal

Thu Apr 12 09:58:38 2007: "Module" DBI



=C2=B7 "installed into: /usr/lib/perl5/site_perl/5.8.8"



=C2=B7 "LINKTYPE: dynamic"



=C2=B7 "VERSION: 1.54"



=C2=B7 "EXE_FILES: dbiproxy dbiprof"





# perldoc perllocal

Thu Apr 12 12:18:50 2007: "Module" DBD::Pg



=C2=B7 "installed into: /usr/lib/perl5/site_perl/5.8.8"



=C2=B7 "LINKTYPE: dynamic"



=C2=B7 "VERSION: 1.49"



=C2=B7 "EXE_FILES: "





Thank you for your time.


------=_NextPart_000_001E_01C77DDA.7C1B87B0--
Curt [ Fr, 13 April 2007 20:45 ] [ ID #1687277 ]
Perl » perl.dbi.users » Confused and needing help on error: "access" has no primary key

Vorheriges Thema: DBD::Oracle patch to set charset via connect attribute
Nächstes Thema: Is DBI::Shell still maintained?