From 91501631267bc622a75c1560002ad74d63527c0d Mon Sep 17 00:00:00 2001 From: Thiago Romano Date: Tue, 10 May 2022 12:01:41 +0200 Subject: [PATCH] Fix Invalid Syntax in Documentation (#402) The current example gives the following error: ``` ** (FunctionClauseError) no function clause matching in Postgrex.DefaultTypes.encode_params/3 The following arguments were given to Postgrex.DefaultTypes.encode_params/3: # 1 "SET lock_timeout TO '10s'" # 2 [] # 3 [] Attempted function clauses (showing 3 out of 3): defp encode_params([param | params], [type | types], encoded) defp encode_params([], [], encoded) defp encode_params(params, _, _) when is_list(params) ``` --- lib/ecto/migration.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ecto/migration.ex b/lib/ecto/migration.ex index 3a5794f7..a77ef1aa 100644 --- a/lib/ecto/migration.ex +++ b/lib/ecto/migration.ex @@ -306,7 +306,7 @@ defmodule Ecto.Migration do use Ecto.Migration def after_begin() do - repo().query! "SET lock_timeout TO '5s'", "SET lock_timeout TO '10s'" + repo().query! "SET lock_timeout TO '5s'" end end end