Hi,
I understand the dilemma. I think it is inherent in having separate 
statements for defining header (interface) and body (implementation). This 
was probably done to be compatible with other sql databases??
But anyway, it is too late now to change this concept;)

If a new field with the old package body is not appropriate, i think your 
suggestion for a new field indicating the validity of the body (comparable 
with rdb$valid_blr for procedures/functions/triggers) will be a good 
alternative.

Kind regards,
Robert

-----Oorspronkelijk bericht----- 
From: Adriano dos Santos Fernandes
Sent: Tuesday, July 29, 2014 6:03 PM
To: For discussion among Firebird Developers
Subject: Re: [Firebird-devel] Created: (CORE-4487) Save package body 
afterALTER/RECREATE PACKAGE

Hi!

Our ALTER PACKAGE always destroys the package body, i.e., routines not
listed in the new package, BLR of listed routines, and the package body
source.

This request "as is" is not appropriate for me, but I tend to agree it's
bad to lose the package body source.

But if we maintain it and someone extracts the script and recreate the
database, it means the new database could be in a different state than
the original.

I.e., we maintained a (valid or not) body of a package that should have
its body recreated to run, while the new database could have its body
already recreated and ready to run, or an error will happen if the body
does not match the new header.

Do you consider this ok?

Some alternatives could be possible, like a new column indicating if the
body is valid, but then others questions will happen, like should then
the body only be readable using RDB$PACKAGES and ignoring it in ISQL
extract/show...


Adriano


PS: If new header matches the old body, i.e., cosmetic changes, the best
thing would be to maintain the body in a valid state. Oracle does this,
but they trust the sources stored. We used to treat stored sources as
"comments", then things are much more difficult for us.


On 07/07/2014 13:11, Robert (JIRA) wrote:
> Save package body after ALTER/RECREATE PACKAGE
> ----------------------------------------------
>
>                  Key: CORE-4487
>                  URL: http://tracker.firebirdsql.org/browse/CORE-4487
>              Project: Firebird Core
>           Issue Type: Improvement
>           Components: Engine
>     Affects Versions: 3.0 Alpha 2
>             Reporter: Robert
>
>
> Currently, if I execute an ALTER/RECREATE PACKAGE statement, the package 
> body will be dropped.
>
> I like to request to save the old body source in rdb$packages (e.g. new 
> field rgb$old_package_body_source).
>
> I have then the old body source available when I want to redefine it with 
> RECREATE PACKAGE BODY.
>


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel 


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to