From: | Alexander Farber <alexander(dot)farber(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Constraint: string length must be 32 chars |
Date: | 2010-10-16 16:48:51 |
Message-ID: | AANLkTi=FgCn-N7taV2L8Fo3RK6Mgx_pG+UodOuoijoiv@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2010-10-16 17:00:26 | Re: Constraint: string length must be 32 chars |
Previous Message | Raymond O'Donnell | 2010-10-16 16:27:14 | Re: Constraint: string length must be 32 chars |