On 02/04/2021 08:12, Vlad Khorsun wrote:
> 02.04.2021 14:00, Adriano dos Santos Fernandes wrote:
>> Hi!
>>
>> Firebird is doing the difficult thing.
>>
>> It's good to store all metadata parts and even for extract it may be
>> useful.
>>
>> But we should also store routines header in addition and separately from
>> the body.
> 
>   Why separately ? Backward compatibility with existing tools or is there
> another reasons ?
> 

See below.

>> With routines header, extract would be much easier and will preserve
>> every comments and formatting.
> 
>   Sure.
> 
>   Note, there is (at least) one more issue: if header starts with "ALTER",
> extract should consider to add "CREATE OR " before it.
> 

It's also why I said to not store CREATE OR ALTER, RECREATE and ALTER.

Just store from PROCEDURE.

ISQL could then CREATE, CREATE OR ALTER or RECREATE.

It should not be mixed with body because ISQL (extract) needs the header
separately.

It first create headers, then body to avoid circular dependencies problem.

However there is still problematic case: ALTER TRIGGER may be used to
alter pieces of metadata without all options, preserving the non
specified pieces.


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to