Skip site navigation (1) Skip section navigation (2)

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 22:20:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Wow... it worked.  See what happens when you learning you make little
mistakes.  Should have realized that earlier when someone else suggested.
Thanks a lot everyone.



Hmm, after reformating your SQL so I can read it, I found this:

"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)"

What are you expecting to happen with DEFAULT with nothing after it?
That's the 'at or near ","' part. Either drop the DEFAULT or add a text
to default to.

Are you perhaps looking for NULL? (as apposed to NOT NULL?) It's allowed
in the grammar, but is the default, so you don't need it.


In response to

pgsql-interfaces by date

Next:From: Tony NakamuraDate: 2000-11-22 00:22:12
Subject: Tomcat & JDBC
Previous:From: Ross J. ReedstromDate: 2000-11-21 22:06:48
Subject: Re: Create tables using Perl DBI

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group