ALTER DOMAIN ... TO <new_name> allows to specify <new_name> matching to 'RDB$[[:DIGIT:]]*' [CORE4917] #5209
Submitted by: @pavel-zotov
On empty database do:
Database: /3255:e25, User: SYSDBA
-- But using ALTER DOMAIN statement one may see that such domain CAN be created:
SQL> create domain foo int;
Records affected: 1
The text was updated successfully, but these errors were encountered:
Commented by: Sean Leyne (seanleyne)
What I find interesting is that you cant create the RDB$ domain in the first place.
There is no restriction against creating other RDB$ objects; tables, views, indexes, triggers and procedures. So, why should domains be special?
Commented by: @pavel-zotov
> What I find interesting is
As of 'special missing' of 'RDB$' prefix, I think that it serves at least one purpose: to detect that some procedure parameter was defined as 'direct' reference to some base type (e.g, integer, varchar etc) rather than via domain.
Consider following sample:
create or alter procedure sp_test as begin end;
create domain dm_test int default 111;
set term ^;
show proc sp_test;
set width proc_name 8;
Its output will be (on 2.5):