Re: Create table error - Mailing list pgsql-novice

From Stephan Szabo
Subject Re: Create table error
Date
Msg-id 20040914134148.E25844@megazone.bigpanda.com
Whole thread Raw
In response to Create table error  (Kumar S <ps_postgres@yahoo.com>)
Responses Re: Create table error
List pgsql-novice
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?

pgsql-novice by date:

Previous
From: Kumar S
Date:
Subject: Create table error
Next
From: Ennio-Sr
Date:
Subject: Re: Create table error