[Catalyst] A table called session
Chisel Wright
chisel at herlpacker.co.uk
Wed Nov 23 21:57:59 CET 2005
Further to my experimentation with the new State/Store session modules,
I stumbled acroos some unexpected behaviour with a table inmy database
called 'session'.
Is this a special method/tablename/something?
I did the following (on 5.56):
---- cut here ----
catalyst.pl App1
cd App1
psql -d template1 -f db/app1.psql
./script/app1_create.pl model SomeDB CDBI dbi:Pg:dbname=app1
---- cut here ----
---- file:db/app1.psql ----
CREATE DATABASE app1 WITH ENCODING='UTF8';
\connect app1
BEGIN;
CREATE TABLE session (
id SERIAL,
session_id text,
storage text,
expires timestamp with time zone,
primary key (id)
);
COMMIT;
---- file:db/app1.psql ----
and I get the following error:
---- cut here ----
exists
"/home/chisel/development/tmp/new_sessions/App1/script/../lib/App1/Model"
exists
"/home/chisel/development/tmp/new_sessions/App1/script/../t/Model"
exists
"/home/chisel/development/tmp/new_sessions/App1/script/../lib/App1/Model/SomeDB.pm"
Use of uninitialized value in split at
/usr/lib/perl5/vendor_perl/5.8.5/Class/DBI/Pg.pm line 81.
"session" has no primary key at
/usr/lib/perl5/vendor_perl/5.8.7/Class/DBI/Loader/Generic.pm line 196
---- cut here ----
I create App2 in the same way, renamed the table to web_session, and the
problem just went away.
I did a quick 'grep -r session
/usr/lib/perl5/vendor_perl/5.8.7/Class/DBI/' but no results were
returned.
Has anyone else seen this? Is it Pg-specific? Can anyone else reproduce
the error?
I'd be interested to know is anyone has any ideas, or is this a
CDBI-specific issue that should be taken to the CDBI list?
Cheers,
Chisel
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
No virus was found in this outgoing message as I didn't bother looking.
More information about the Catalyst
mailing list