[Catalyst] Dumb CDBI question

Toby Corkindale tjc at wintrmute.net
Tue Aug 30 13:12:31 CEST 2005


On Mon, Aug 29, 2005 at 04:44:15PM -0700, Philip Edelbrock wrote:
> 
> Ack!  Answered my own question by looking at CDBI::Generic.  There's 
> "constraint" and "exclude".  E.g.:
> 
> # M/CDBI.pm
> __PACKAGE__->config(
>     dsn           => 'dbi:Pg:dbname=mydb',
>     user          => 'apache',
>     password      => '4321',
>     constraint    => 'mytable',
>     exclude       => 'mytable2',
>     options       => { AutoCommit => 1},
>     relationships => 1,
>     additional_base_classes => [qw/Class::DBI::FromForm 
> Class::DBI::AsForm/],
> );
> 
> BTW- for Pg, I wonder why we can't just use the "oid" as the primary key 
> when a user-defined one isn't available?

Because they intend to make "WITHOUT OIDS" the default for new tables, in
future releases of PostgreSQL, perhaps?
See http://www.postgresql.org/docs/8.0/static/datatype-oid.html

tjc

-- 
Turning and turning in the widening gyre/The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold/Mere anarchy is loosed upon the world
(gpg --keyserver www.co.uk.pgp.net --recv-key 897E5FF3)



More information about the Catalyst mailing list