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

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

Hi Mamta,

MySQL has a function called database() which prints out database names. But a 
"database" in MySQL is what ANSI/ISO calls a "schema". The functions in 
SYSCS_UTIL follow the convention of separating words with underscores. So I 
think a good name would be SYSCS_UTIL.DATABASE_NAME.

The SQL Standard has a vague concept of "catalog", which is close to the Derby 
concept of "database". And there is a SQL Standard builtin function called 
CURRENT_CATALOG. However, there are all sorts of JDBC metadata calls which take 
a catalog argument, which we ignore. I think that people would expect us to 
accept non-null values for catalog arguments if we introduced the concept of a 
Derby catalog.

Thanks,
-Rick

> 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.0.0
>            Reporter: Rick Hillegas
>            Assignee: Mamta A. Satoor
>
> 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