VIEW not visible if created under a different schema #3766
Last updated: 2015-08-28 13:42:58 +0200
Date: 2015-07-15 16:07:32 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0
[This also happens in Jul2015]
In the following mclient session, although it reports "CREATE VIEW tst.v1..." succeeded (note the schema 'tst' which is different than the current schema 'sys'), SELECT from tst.v1 says "no such table". Also, the view is not found in the SQL catalogue.
sql>create table t1 (i int);
It doesn't helpt to switch to the other schema 'tst':
However, if one first switches to the other schema 'tst', and create the view. Then the view is visible in both 'tst' and 'sys'. Also, tst.v1 is added to the SQL catalogue:
sql>set schema tst;
Steps to Reproduce:
create table t1 (i int);
1st select query: error
sql>select * from tst.v1;
Date: 2015-07-15 16:26:33 +0200
This bug is related to Bug #3708, but is slightly different.
Bug #3708 is about creating a view V for schema2 under schema2, and then try to access schema2.V in schema1. This works now, as is also shown in my mclient session.
This bug is about creating a viw V for schema2 under schema1 (!), and then try to access schema2.V in schema1 will result in an error.
Date: 2015-07-15 16:38:12 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0e35d49441c9
Date: 2015-07-15 17:20:43 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0d892d399f1e
Date: 2015-07-22 15:23:45 +0200
the create view should have failed, as the t1 table is never reachable from the tst schema. We now properly detect that, ie use the proper schema to execute the sub-(view)-query
Date: 2015-07-24 14:41:38 +0200
When processing "create view tst.v1" do you switch current_schema to "tst" underwater? Because, now
create view tst.v1 (i) as select * from t1;
will return "SELECT: no such table 't1'", while
create view tst.v1 (i) as select * from sys.t1;
will succeed (as it should).
Is this expected behaviour? So even if I'm still in schema "sys", I have to explicitly identify t1 with sys.t1?
Date: 2015-08-28 13:42:58 +0200
Jul2015 has been released.
The text was updated successfully, but these errors were encountered: