sijms / go-ora

Pure go oracle client
MIT License
771 stars 169 forks source link

fix alter session set_clause #509

Closed rheilek closed 6 months ago

rheilek commented 6 months ago

If go_ora.AddSessionParam(db, "CURRENT_SCHEMA", schema) used, single quotes at "alter session set %s='%s'" raises ORA-02421: missing or invalid schema authorization identifier.

I think the caller should do escaping (add quotes) if necessary.

go_ora.AddSessionParam(db, "CURRENT_SCHEMA", schema)
go_ora.AddSessionParam(db, "nls_date_format", "'DD-MON-YYYY HH24:MI:SS'")