Re: Create table error

From: Kumar S <ps_postgres(at)yahoo(dot)com>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Create table error
Date: 2004-09-14 21:39:28
Message-ID: 20040914213928.35322.qmail@web61206.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thank you Stephan Szabo,
I removed additional information from parenthesis and
it worked.
What I wanted to store is a number (e.g:15099404)
which is a publication ID from PubMed (medical litt.
database). This number I wanted to use further to
build queries to extract the publication linked to
that number.

My collegue suggested that I could store that number
as a string too because I will not be doing any
calculations on that number.

Do you have any comments.

Thanks
Kumar.

--- Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
wrote:

> On Tue, 14 Sep 2004, Kumar S wrote:
>
> > Dear group,
> > Could you please suggest if my sql syntax is wrong
> for
> > creating the table:
> > my sql statements:
> > create table EXPERIMENT
> > (
> > exp_id serial,
> > exp_name varchar(32) not null,
> > con_id serial references
> > contacts(con_id),
> > exp_type varchar(32) not null,
> > exp_desc varchar(64),
> > exp_pmid integer(30) not null,
> > exp_rawdata_url varchar(32),
> > constraint experiment_pk primary
> > key(exp_id)
> > );
> >
> >
> > When I compile this I get the following error:
> > psql:/home/sk/temp/postgres/exp.sql:11: ERROR:
> syntax
> > error at or near "(" at character 200
> >
> > What is wrong with my code.
>
> The type INTEGER doesn't take additional information
> in parens.
> What range of values were you trying to hold?
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2004-09-14 21:55:25 Re: Create table error
Previous Message Ennio-Sr 2004-09-14 21:19:40 Re: Create table error