RE: Create tables using Perl DBI

From: "David Coley" <davidcoley(at)home(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: Create tables using Perl DBI
Date: 2000-11-21 21:50:54
Message-ID: HEEKIDKMKOPLHIMFOPMLKEIICDAA.davidcoley@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hum... I tried adding that extra ) at end of the prepare:

$sth = $dbh->prepare("create table customer (ID serial PRIMARY KEY, name
text NOT NULL, email text NOT NULL, phone text NOT NULL, fax text DEFAULT,
address text NOT NULL, address2 text DEFAULT, zip text NOT NULL, city text
NOT NULL, state text NOT NULL, country text NOT NULL)")
or die "Could not Create Table: $DBI::errstr";
$sth->execute;
#disconnect from the database.
$dbh->disconnect();

>
> It looks like you're missing a ")" in there somewhere.
> Parse error usually = syntax error.
>

Still the same error:

DBD::Pg::st execute failed: ERROR: parser: parse error at or near ","

David Coley
davidcoley(at)home(dot)com
http://www.davidcoley.com

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-11-21 22:06:48 Re: Create tables using Perl DBI
Previous Message Sanjay Arora 2000-11-21 21:38:26 Large Objects...ODBC/VB6/ADO...& PostgreSQL