We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
:socket_dir
mix ecto.load
1 parent 1952ce2 commit a8275caCopy full SHA for a8275ca
lib/ecto/adapters/postgres.ex
@@ -343,7 +343,15 @@ defmodule Ecto.Adapters.Postgres do
343
args =
344
if port = opts[:port], do: ["-p", to_string(port)|args], else: args
345
346
- host = opts[:hostname] || System.get_env("PGHOST") || "localhost"
+ host = opts[:socket_dir] || opts[:hostname] || System.get_env("PGHOST") || "localhost"
347
+
348
+ if opts[:socket] do
349
+ IO.warn(
350
+ ":socket option is ignored when connecting in structure_load/2 and structure_dump/2," <>
351
+ " use :socket_dir or :hostname instead"
352
+ )
353
+ end
354
355
args = ["--host", host|args]
356
args = args ++ opt_args
357
System.cmd(cmd, args, env: env, stderr_to_stdout: true)
0 commit comments