[ 
https://issues.apache.org/jira/browse/DERBY-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14961919#comment-14961919
 ] 

Rick Hillegas commented on DERBY-6725:
--------------------------------------

Hi Kathey,

I think that the function needs more work and is not ready to be exposed. The 
database name should be canonicalized. In the following script, the last 3 
databases are all the same database, but syscs_util.syscs_get_database_name() 
reports different names for them.

Thanks,
-Rick

{noformat}
connect 'jdbc:derby:memory:db;create=true';

-- reports "memory:db"
values syscs_util.syscs_get_database_name();

connect 'jdbc:derby:/Users/rhillegas/derby/mainline/db;create=true';

-- reports "/Users/rhillegas/derby/mainline/db"
values syscs_util.syscs_get_database_name();

connect 'jdbc:derby:db;create=true';

-- reports "db"
values syscs_util.syscs_get_database_name();

connect 'jdbc:derby:~/db;create=true';

-- reports "~/db"
values syscs_util.syscs_get_database_name();
{noformat}

> Add a system function which returns the name of the database.
> -------------------------------------------------------------
>
>                 Key: DERBY-6725
>                 URL: https://issues.apache.org/jira/browse/DERBY-6725
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.12.1.1
>            Reporter: Rick Hillegas
>            Assignee: Mamta A. Satoor
>         Attachments: DERBY6725_getdbname_patch1_diff.txt, 
> DERBY6725_getdbname_patch1_stat.txt
>
>
> Got this request in private conversation with a user. Other databases provide 
> this functionality. Seems straightforward to add.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to