Hello I blocked in the creation of a simple table please help me
using ubuntu 11.04 – PostgreSQL 8.4.8
with phppgadmin I get this code :
CREATE TABLE users
(
id SERIAL,
username CHARACTER VARYING(255),
PASSWORD CHARACTER VARYING(255),
etat INTEGER(1),
avatar CHARACTER VARYING(255),
description text,
email CHARACTER VARYING(255),
website CHARACTER VARYING(255),
country CHARACTER VARYING(255),
location CHARACTER VARYING(255),
nb_upload INTEGER,
sexe CHARACTER VARYING(25),
group_id INTEGER,
created DATE,
modified DATE,
enable_mail INTEGER(1),
enable_location INTEGER(1),
facebook_id BIGINT,
PRIMARY KEY (id)
)
but every time I execute , it return this error :
ERROR: syntax error at or near “(”
LINE 1: … “password” character varying(255), “etat” integer(1), “avat…
thanks
integer(1)is not a valid data type in PostgreSQL. The correct name isintegerSee the manual for a complete list of all available types:
http://www.postgresql.org/docs/current/static/datatype.html
Edit:
If you want to store a “flag” that stores true/false use the
booleandata type instead.