Subject | Re: [firebird-support] Re: Alternative for UNIQUE constraint |
---|---|
Author | Mark Rotteveel |
Post date | 2009-03-28T11:49:31Z |
Helen Borrie wrote:
* declaration of NOT NULL before DEFAULT (not allowed)
* an inline CHECK constraint and inline FOREIGN KEY constraint (not allowed)
* the CHECK constraint is incorrect (should be CHECK (id >= -0) resp
CHECK (volume >= -1)).
But still, that does match with your assertion that foreign keys must be
declared explicitly (they don't) and that it is advisable to declare
them in a separate transaction (why? I see no need for that, and if
there is some hidden reason that should be considered a bug).
Mark
--
Mark Rotteveel
> At 10:13 PM 28/03/2009, Mark Rotteveel wrote:Could you enlighten me, the only things I see wrong with it are:
>>> It's wrong according to the LangRef, though.
>> Actually according to the LangRef it is allowed (see the syntax on page
>> 72, and the notes on page 77-78).
>
> I don't think you looked closely enough at his table definition. ;-)
* declaration of NOT NULL before DEFAULT (not allowed)
* an inline CHECK constraint and inline FOREIGN KEY constraint (not allowed)
* the CHECK constraint is incorrect (should be CHECK (id >= -0) resp
CHECK (volume >= -1)).
But still, that does match with your assertion that foreign keys must be
declared explicitly (they don't) and that it is advisable to declare
them in a separate transaction (why? I see no need for that, and if
there is some hidden reason that should be considered a bug).
Mark
--
Mark Rotteveel