Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISQL v 2.5 extract metadata extract view with procedure into "from" earlier than the needed procedure [CORE6162] #6411

Closed
firebird-automations opened this issue Oct 19, 2019 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Anatoly Loy (anatoloy)

Attachments:
extract.epp
diff.txt

1. Script for test:
CREATE PROCEDURE a() RETURNS (out1 INTEGER)
AS
BEGIN
out1 = 1;
SUSPEND;
END;

CREATE VIEW b(b1) AS SELECT out1 as b1 FROM a();

2. ISQL extract metadata in wrong order (view then procedure). That result not create new datanase correctly.

@firebird-automations
Copy link
Collaborator Author

Commented by: Anatoly Loy (anatoloy)

Offer for fix

@firebird-automations
Copy link
Collaborator Author

Modified by: Anatoly Loy (anatoloy)

Attachment: extract.epp [ 13390 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

It is a chicken-egg problem. Procedures using views are much more wide spread than views using procedures.

@firebird-automations
Copy link
Collaborator Author

Commented by: Anatoly Loy (anatoloy)

The attached files (new source and diff) contains realization of current issue:
Common approach already knew in the software world: for create complex dependencies you need to split interface and implementation.
Common idea is already used to solve dependencies issue in procedures creating: firs creating "dummy" procedures (i.e. interface) and then alter procedures bodies.
Common algorithm for current issue is simple:
1. Creating dummy procedures (interfaces) must be earlier than creating view;
2. Create views.
3. Alter procedures bodies.

@firebird-automations
Copy link
Collaborator Author

Modified by: Anatoly Loy (anatoloy)

Attachment: diff.txt [ 13391 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Anatoly Loy (anatoloy)

And in the end, it's already done in FB 3.0 ;)

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Issue is already fixed in fb3

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Anatoly, you should be able to use ISQL v3 with v2.5.x databases.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant