Subject Re: [ib-support] FB isql problem metadata extraction of domains with Check
Author Helen Borrie
At 10:08 AM 29/05/2003 -0400, you wrote:
>I extracted metadata using isql -a > metadata.sql. After editing the create
>line, when I try to rebuild the metadata via isql -i metadata.sql it creates
>the database but chokes on:
>
> CREATE DOMAIN BOOLEAN AS CHAR(1)
> Default 'N'
> ( Check (Value in ('N','Y')));
>
>
>Here's the error:
>
> Dynamic SQL Error
> -SQL error code = -104
> -Token unknown - line 3, char 10
> -(
> Statement failed, SQLCODE = -607
>
>I verified that this is the line by changing it to:
> CREATE DOMAIN BOOLEAN AS CHAR(1) Default 'N'
> ( Check (Value in ('N','Y')));
>
>At which point the error line changes to 2 ;-).
>
>This sounds like a bug, I checked the bug tracking system and didn't find
>this specific issue (some that looked similar though).

It's an error. CHECK is the keyword that signals to the parser that a CHECK
constraint clause follows. It is not parenthesised:

CREATE DOMAIN BOOLEAN AS CHAR(1)
Default 'N'
Check (Value in ('N','Y'));


heLen