Serial columns in PostgreSQL
[prev]
[thread]
[next]
[Date index for 2004/11/29]
Hi,
This is probably a FAQ, but I haven't found a mesage that mentions it.
I have this table:
create table persona(
persona_id serial not null primary key,
persona_name varchar(255) not null,
persona_surname varchar(255) not null,
persona_password varchar(20) not null,
persona_email varchar(255) not null,
persona_url varchar(255),
unique( persona_id, persona_email )
);
With this module:
package My::CEDI::Persona;
use lib '../..';
use base 'My::CEDI';
our ($VERSION) = ('$Revision: 1.2 $' =~ /(\d+\.\d+)/ );
our $prefijo = 'persona'; #Se quita del nombre de las columnas para
dar los accesores
__PACKAGE__->table('persona');
__PACKAGE__->columns( All => qw( persona_id persona_name
persona_surname persona_password persona_email persona_url ) );
--
How can I convince Class::DBI that it should leave the database handle
the persona_id auto-increment column?
Should I just leave it off the "All" columns?
JJ
|
Serial columns in PostgreSQL
JJ Merelo 13:10 on 29 Nov 2004
|