我想获取当前连接架构名称,我发现 'show search_path' 返回所需结果,但我需要在查询中使用此结果。
如何在 Postgres 查询中使用 "show search_path"?
if not (SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE
table_name = 'customer' and table_schema = **show search_path** )) then
do something ....
end
I need to use table_schema = show search_path
SELECT CURRENT_SCHEMA
吗? - Jim Jones