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
ALTER DOMAIN ... TO <new_name> allows to specify <new_name> matching to 'RDB$[[:DIGIT:]]*' [CORE4917] #5209
Comments
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): Procedure text:begin
|
Commented by: @asfernandes Pavel, please..... Do not mark "Affects version" with unreleased releases! |
Modified by: @asfernandesVersion: 3.0 Beta 2 [ 10586 ] Version: 2.5.4 [ 10585 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] Version: 3.0 RC 1 [ 10584 ] => Version: 2.5.5 [ 10670 ] => |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 RC 1 [ 10584 ] Fix Version: 2.5.5 [ 10670 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Commented by: @pavel-zotov Statements with prefixes 'MON$' and 'SEC$' work w/o exception (checked on 3.0.0.32020): create domain sec$passwords int; Is it OK ? |
Commented by: @asfernandes Yes. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
On empty database do:
Database: /3255:e25, User: SYSDBA
SQL> set list on;
SQL> set count on;
SQL> select rdb$field_name from rdb$fields where trim(rdb$field_name) SIMILAR TO 'RDB$[[:DIGIT:]]*';
Records affected: 0
SQL> create domain rdb$1 int;
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -637
-Implicit domain name RDB$1 not allowed in user created domain // OK, it's expected
-- But using ALTER DOMAIN statement one may see that such domain CAN be created:
SQL> create domain foo int;
SQL> alter domain foo to rdb$1;
SQL> commit;
SQL> select rdb$field_name from rdb$fields where trim(rdb$field_name) SIMILAR TO 'RDB$[[:DIGIT:]]*';
RDB$FIELD_NAME RDB$1
Records affected: 1
SQL> commit;
SQL> show domains;
There are no domains in this database
===
PS. Checked on: WI-V2.5.5.26916, WI-V3.0.0.32008
Commits: d2e67ca 182016b FirebirdSQL/fbt-repository@f26c600 FirebirdSQL/fbt-repository@b782899
The text was updated successfully, but these errors were encountered: