$VIEW("REGION","^*") returns name of default region
Final Release Note
$VIEW("REGION","^*")
returns the name of the region in the global directory to which the *
namespace maps (as seen in a $ydb_dist/yottadb -run GDE SHOW -NAME
output). Previously there was no easy way to determine the default region name. [#513 (closed)]
Description
For example, let us say a global directory has 2 regions, AREG and DEFAULT with the namespace a
mapped to the AREG
region and the namespace *
mapped to the DEFAULT
region.
$ $ydb_dist/mumps -run GDE show -name
*** NAMES ***
Global Region
------------------------------------------------------------------------------
* DEFAULT
a AREG
Currently, I can find out inside M the region mapped to by the a
namespace but cannot find it out for the *
namespace.
YDB>write $view("REGION","^a")
AREG
YDB>write $view("REGION","^*")
%YDB-E-VIEWGVN, Invalid global key name used with VIEW/$VIEW(): "^*"
It would be nice if the second $VIEW command returned the DEFAULT
region name as that is where *
is mapped to. This is in fact required by YottaDB/DBMS/YDBOcto#399 (closed).
Draft Release Note
$VIEW("REGION","^*")
returns the name of the region in the global directory mapped to by the *
namespace (as seen in a $ydb_dist/mumps -run GDE SHOW -NAME
output). Previously it used to issue a VIEWGVN error.