Re: [INTERFACES] Does "constraint" and "check" work in 6.3.2 ?

From: "Jose' Soares" <jose(at)sferacarta(dot)com>
To: Constantin Teodorescu <teo(at)flex(dot)ro>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>, PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] Does "constraint" and "check" work in 6.3.2 ?
Date: 1998-10-29 10:30:27
Message-ID: 363843C3.D50853FF@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

Hi Constantin,

This is a syntax problem, there are two kinds of constraints (table and
column constraints)
and both of them must be defined inside ( ) not outside:

create table emppay (
name text not null check (name <> ''), --column
constraint definition
wage float4 default 10.00,
constraint empcon check (wage > 5.30 and wage <= 30.00) --table
constraint definition
);
CREATE

Jose'

Constantin Teodorescu wrote:
>
> I am planning a new release to PgAccess (mainly bug fixes) and I'm
> wondering if "constraint" and "check" are working !
> I am using PostgreSQL 6.3.2 and this example from man create_table is
> not working for me !
>
> Please reply as soon as possible, so I could release this version prior
> to 6.4 Pg release.
>
> testdb=> create table emppay (name text not null, wage float4 default
> 10.00) constraint empcon check (wage > 5.30 and wage <= 30.00), check
> (name <> '');
> ERROR: parser: parse error at or near "constraint"
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug Smith 1998-10-29 13:51:24
Previous Message Taral 1998-10-29 05:31:51 RE: [GENERAL] Solaris Compile problems

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-10-29 14:46:05 Re: Standalone driver for Unix
Previous Message Andrea Antibo 1998-10-29 06:35:51 Re: [INTERFACES] applet don't go