Quote postgresql database name (#1136)

This commit is contained in:
Jerome Sautret 2016-07-22 16:33:40 +02:00
parent bdfef09c0f
commit ffbe97d988
1 changed files with 1 additions and 1 deletions

View File

@ -790,7 +790,7 @@ pgsql_connect(Server, Port, DB, Username, Password) ->
{port, Port},
{as_binary, true}]) of
{ok, Ref} ->
pgsql:squery(Ref, [<<"alter database ">>, DB, <<" set ">>,
pgsql:squery(Ref, [<<"alter database \"">>, DB, <<"\" set ">>,
<<"standard_conforming_strings='off';">>]),
pgsql:squery(Ref, [<<"set standard_conforming_strings to 'off';">>]),
{ok, Ref};