PostgreSQL current_schema() 函数
PostgreSQL current_schema() 函数返回当前模式的名称。
current_schema() 语法
这里是 PostgreSQL current_schema() 函数的语法:
sql
current_schema() -> name或者
sql
current_schema -> name参数
PostgreSQL current_schema() 函数无需任何参数。
返回值
PostgreSQL current_schema() 函数返回当前模式的名称。
current_schema() 示例
要获取当前数据库的名字,请使用下面带有 current_schema() 函数的 SELECT 语句:
sql
SELECT current_schema();bash
current_schema
----------------
public或者你也可以使用 current_schema 代替 current_schema(),如下:
sql
SELECT current_schema;bash
current_schema
----------------
public