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

CREATE VIEW ignores PLAN [CORE203] #530

Closed
firebird-automations opened this issue Aug 17, 2001 · 7 comments
Closed

CREATE VIEW ignores PLAN [CORE203] #530

firebird-automations opened this issue Aug 17, 2001 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: tord (tord)

SFID: 452120#⁠
Submitted By: tord

When you include an explicit plan in a CREATE VIEW
statement, the plan is silently ignored.

Demonstration:
<snip>
/*
* This sql-script tests for the viewplan-bug
*
* set ISC_USER and ISC_PASSWORD, then call
* isql -i viewplan.sql
*/
create database "viewplan.gdb";

create table a (
b integer not null
);
create index a_b on a(b);

create view view_a(b) as
select b
from a
where b < 2
plan (a natural);
commit;

set plan;
set echo;
select * from view_a;
select b from a where b < 2
plan (b natural);
commit;

drop database;
<snip>

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-09-05 18:14
Sender: dimitr
Logged In: YES
user_id=61270

If anyone thinks that a PLAN option should be available in
views, please create a new feature request. I consider this
issue closed.

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2003-01-21 10:28
Sender: dimitr
Logged In: YES
user_id=61270

I tend to think that a PLAN option should be disallowed in the VIEW
declaration until this issue is fixed. We've already done the same thing for
FIRST/SKIP in v1.5, so why should PLAN be different? Once all these
problems are solved, we will allow these options again.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10227 ] => Firebird [ 14454 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

What's the current state of issue about forbidden PLAN specification in a view DDL ?

As far as I see one may still to specify PLAN but it's ignored (as before):

SQL> recreate table test(x int unique using index test_x_unq);
SQL> recreate view v_test as select x from test t where x = 0 plan (t natural);
SQL> insert into test select row_number()over()-5 from rdb$types rows 10;
SQL> commit;

SQL> set plan on;
SQL> select x from test t where x = 0 plan (t natural);

PLAN (T NATURAL)

       X

============
0

SQL> select x from v_test t where x = 0;

PLAN (T T INDEX (TEST_X_UNQ)) ------------- ? Why ?

       X

============
0

SQL> select x from v_test t where x = 0 plan (t natural); -- this plan was included into this view DDL when it was created. We have to repeat it again here ?

PLAN (T T NATURAL)

       X

============
0

PS. Checked on: WI-V2.5.6.26980; WI-V3.0.0.32380.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Waiting for reply on comment 15/Mar/16 11:22 AM

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done successfully

Test Details: Waiting for reply on comment 15/Mar/16 11:22 AM =>

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

2 participants