in reply to Working with Postgresql serial data type in Perl
Most likely, you want to send it a NULL value. You should be using DBI placeholders instead of interpolating data into a string, just to avoid SQL interpolation problems. See DBI for placeholders and http://bobby-tables.com/ for why.
my $sth_insert = $dbh->prepare(<<'SQL'); insert into mytable (desc,compid) values (?, ?) SQL my ($description, $compid) = ("Some description", undef); $sth_insert->execute( $description, $compid );
Update: Actually set the values to insert
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Working with Postgresql serial data type in Perl
by vendion (Scribe) on Dec 18, 2010 at 21:11 UTC |