** (Postgrex.Error) ERROR 42601 (syntax_error): cannot insert multiple commands into a prepared statement
--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/ad5d923e-996d-4997-9d60-91b3f8539353%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can use the after connect callback. For example, in your config files:after_connect: {Postgrex, :query!, ["SET search_path TO global_prefix", []]}
You can also specify your own module that will receive the Postgrex connection as argument.
I will add some documentation to the adapters.José ValimFounder andDirector of R&D
On Wed, Jan 31, 2018 at 5:34 PM, <l.ri...@gmail.com> wrote:
Hi,I found a problem with executing raw sql.In my query I want to use `SET work_mem = '32 MB'` to increase the Postgres work_mem for this particular session, leaving the system default for all others.I have not found a way to do this, whenever I prepend this statement before my query, I run into an error with prepared statements.** (Postgrex.Error) ERROR 42601 (syntax_error): cannot insert multiple commands into a prepared statementI have sifted through all READMEs to see how I can disable prepared statements for a particular query, there seems to be no way.What can I do about this?How would I run some SQL for each connection before I use it?Any help highly appreciated.Kind regards,Lukas Rieder
--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.