snake=> create table gps (
id varchar(32) primary key CONSTRAINT id_length char_length(id)=32,
stamp timestamp DEFAULT current_timestamp,
pos point);
ERROR:  syntax error at or near "char_length"
LINE 2: id varchar(32) primary key CONSTRAINT id_length char_length(...
                                                        ^

snake=> create table gps (
id varchar(32) primary key CHECK id_length char_length(id)=32,
stamp timestamp DEFAULT current_timestamp,
pos point);
ERROR:  syntax error at or near "id_length"
LINE 2: id varchar(32) primary key CHECK id_length char_length(id)=3...
                                         ^

snake=> create table gps (
id varchar(32) primary key CHECK char_length(id)=32,
stamp timestamp DEFAULT current_timestamp,
pos point);
ERROR:  syntax error at or near "char_length"
LINE 2: id varchar(32) primary key CHECK char_length(id)=32,
                                         ^

Sorry, any ideas? (I know it's a stupid question)
Alex

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to