8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 14:03:03 +01:00

Fixes to RDB$SQL package.

This commit is contained in:
Adriano dos Santos Fernandes 2024-12-08 09:17:45 -03:00
parent 7d13f3fb12
commit e392484582
3 changed files with 8 additions and 8 deletions

View File

@ -19,14 +19,14 @@ Output parameters:
- `LEVEL` type `INTEGER NOT NULL` - indentation level (may have gaps in relation to parent's level)
- `PACKAGE_NAME` type `RDB$PACKAGE_NAME` - package name of a stored procedure
- `OBJECT_NAME` type `RDB$RELATION_NAME` - object (table, procedure) name
- `ALIAS` type `RDB$RELATION_NAME` - alias name
- `ALIAS` type `RDB$SHORT_DESCRIPTION` - alias name
- `RECORD_LENGTH` type `INTEGER` - record length for the record source
- `KEY_LENGTH` type `INTEGER` - key length for the record source
- `ACCESS_PATH` type `VARCHAR(255) CHARACTER SET UTF8 NOT NULL` - friendly plan description
- `ACCESS_PATH` type `RDB$DESCRIPTION NOT NULL` - friendly plan description
```
select *
from rdb$sql.explain('select * from employees where id = ?');
from rdb$sql.explain('select * from employee where emp_no = ?');
```
```
@ -34,9 +34,9 @@ select *
from rdb$sql.explain(q'{
select *
from (
select name from employees
select full_name name from employee
union all
select name from customers
select customer name from customer
)
where name = ?
}');

View File

@ -184,9 +184,9 @@ SqlPackage::SqlPackage(MemoryPool& pool)
{"PARENT_RECORD_SOURCE_ID", fld_gen_val, true},
{"LEVEL", fld_integer, false},
{"OBJECT_TYPE", fld_obj_type, true},
{"PACKAGE_NAME", fld_r_name, true},
{"PACKAGE_NAME", fld_pkg_name, true},
{"OBJECT_NAME", fld_r_name, true},
{"ALIAS", fld_r_name, true},
{"ALIAS", fld_short_description, true},
{"CARDINALITY", fld_statistics, true},
{"RECORD_LENGTH", fld_integer, true},
{"KEY_LENGTH", fld_integer, true},

View File

@ -52,7 +52,7 @@ private:
(FB_SMALLINT, objectType)
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), packageName)
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), objectName)
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), alias)
(FB_INTL_VARCHAR(255 * METADATA_BYTES_PER_CHAR, CS_METADATA), alias)
(FB_DOUBLE, cardinality)
(FB_INTEGER, recordLength)
(FB_INTEGER, keyLength)