Skip to content

Commit a1aaa40

Browse files
committed
use current_schema in PLSQL::Schema#schema_name
1 parent 2f6b241 commit a1aaa40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/plsql/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def logoff
9090
# Current Oracle schema name
9191
def schema_name
9292
return nil unless connection
93-
@schema_name ||= select_first("SELECT SYS_CONTEXT('userenv','session_user') FROM dual")[0]
93+
@schema_name ||= select_first("SELECT SYS_CONTEXT('userenv','current_schema') FROM dual")[0]
9494
end
9595

9696
# Default timezone to which database values will be converted - :utc or :local

0 commit comments

Comments
 (0)