{"Entry":{"collection":"func","key":"current-database","name":"current_database","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"7.3"},{"descriptions_changed":false,"doc_overhaul":false,"from":"7.4","group_changed":{"from":"misc","to":"info"},"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.0"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"547baaea7ab56873f80d6d1ff6e1092a70c232794d579d01ee94833995c28f4a","first_version":"7.3","group":"info","group_label":"System Information Functions And Operators","groups":["misc","info"],"imported_at":"2026-09-27T17:57:29.038467+08:00","last_version":"20","name":"current_database","name_key":"current_database","position":28004,"present_in":["7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"current_database () → name","signature_count":1,"slug":"current-database","source_rev":"b7bd9cda","summary":"Returns the name of the current database.","summary_zh":""}},"Definition":{"Collection":"func","Key":"current-database","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"current-database","SourceRevision":"b7bd9cda","Facts":{"description":"Returns the name of the current database. (Databases are called “catalogs” in the SQL standard, so current_catalog is the standard's spelling.)","description_html":"Returns the name of the current database. (Databases are called \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ecatalogs\u003c/span\u003e”\u003c/span\u003e in the SQL standard, so \u003ccode class=\"function\"\u003ecurrent_catalog\u003c/code\u003e is the standard's spelling.)","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-INFO-SESSION-TABLE","file":"functions-info.html","slug":"18"},"group":"info","group_label":"System Information Functions And Operators","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Returns the name of the current database. (Databases are called “catalogs” in the SQL standard, so current_catalog is the standard's spelling.)","description_html":"Returns the name of the current database. (Databases are called \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ecatalogs\u003c/span\u003e”\u003c/span\u003e in the SQL standard, so \u003ccode class=\"function\"\u003ecurrent_catalog\u003c/code\u003e is the standard's spelling.)","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ecurrent_database\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003ename\u003c/code\u003e","returns":"name","text":"current_database () → name","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-SESSION-TABLE","file":"functions-info.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"current-database","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"current_database","Summary":"返回当前数据库的名称。（SQL 标准将数据库称为“目录（catalogs）”，因此current_catalog是标准中的写法。）","BodyHTML":"返回当前数据库的名称。（SQL 标准将数据库称为\u003cspan\u003e“\u003cspan\u003e目录（catalogs）\u003c/span\u003e”\u003c/span\u003e，因此\u003ccode\u003ecurrent_catalog\u003c/code\u003e是标准中的写法。）\u003cpre\u003ecurrent_database () → name\u003c/pre\u003e返回当前数据库的名称。（SQL 标准将数据库称为\u003cspan\u003e“\u003cspan\u003e目录（catalogs）\u003c/span\u003e”\u003c/span\u003e，因此\u003ccode\u003ecurrent_catalog\u003c/code\u003e是标准中的写法。）","SourceRevision":"ca936764","ContentHash":"6f9f407998ee854e999c5e2527cdef3d5bc473660e9fc20431ff2cd546a65402","Payload":{"description_zh":"返回当前数据库的名称。（SQL 标准将数据库称为“目录（catalogs）”，因此current_catalog是标准中的写法。）","description_zh_html":"返回当前数据库的名称。（SQL 标准将数据库称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e目录（catalogs）\u003c/span\u003e”\u003c/span\u003e，因此\u003ccode class=\"function\"\u003ecurrent_catalog\u003c/code\u003e是标准中的写法。）","signatures":[{"description_zh":"返回当前数据库的名称。（SQL 标准将数据库称为“目录（catalogs）”，因此current_catalog是标准中的写法。）","description_zh_html":"返回当前数据库的名称。（SQL 标准将数据库称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e目录（catalogs）\u003c/span\u003e”\u003c/span\u003e，因此\u003ccode class=\"function\"\u003ecurrent_catalog\u003c/code\u003e是标准中的写法。）","returns":"name","text":"current_database () → name","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"504c2d146239a59fd7f59f586d7c1896954172b25200cb839b00e6583e7139dc","Text":"current_database () → name","Returns":"name","Payload":{"description":"Returns the name of the current database. (Databases are called “catalogs” in the SQL standard, so current_catalog is the standard's spelling.)","description_html":"Returns the name of the current database. (Databases are called \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ecatalogs\u003c/span\u003e”\u003c/span\u003e in the SQL standard, so \u003ccode class=\"function\"\u003ecurrent_catalog\u003c/code\u003e is the standard's spelling.)","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ecurrent_database\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003ename\u003c/code\u003e","returns":"name","text":"current_database () → name","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
