mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
pgsql: do not set standard_conforming_strings to 'off' (#3944)
Since f9120f75b0
string literals use escape string syntax (E'...') on
pgsql, so it is no longer necessary to set standard_conforming_strings
to 'off'
Fixes #3932
This commit is contained in:
parent
c6513fcfc6
commit
a1cfae8c98
@ -1005,22 +1005,14 @@ sqlite_to_odbc(_Host, _) ->
|
||||
%% Open a database connection to PostgreSQL
|
||||
pgsql_connect(Server, Port, DB, Username, Password, ConnectTimeout,
|
||||
Transport, SSLOpts) ->
|
||||
case pgsql:connect([{host, Server},
|
||||
pgsql:connect([{host, Server},
|
||||
{database, DB},
|
||||
{user, Username},
|
||||
{password, Password},
|
||||
{port, Port},
|
||||
{transport, Transport},
|
||||
{connect_timeout, ConnectTimeout},
|
||||
{as_binary, true}|SSLOpts]) of
|
||||
{ok, Ref} ->
|
||||
pgsql:squery(Ref, [<<"alter database \"">>, DB, <<"\" set ">>,
|
||||
<<"standard_conforming_strings='off';">>]),
|
||||
pgsql:squery(Ref, [<<"set standard_conforming_strings to 'off';">>]),
|
||||
{ok, Ref};
|
||||
Err ->
|
||||
Err
|
||||
end.
|
||||
{as_binary, true}|SSLOpts]).
|
||||
|
||||
%% Convert PostgreSQL query result to Erlang ODBC result formalism
|
||||
pgsql_to_odbc({ok, PGSQLResult}) ->
|
||||
|
Loading…
Reference in New Issue
Block a user