Skip to content

Commit

Permalink
Debug-log successful SQL function definition
Browse files Browse the repository at this point in the history
  • Loading branch information
alco committed Oct 16, 2023
1 parent 8d18ee9 commit 1ed6b9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/electric/lib/electric/postgres/extension.ex
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,12 @@ defmodule Electric.Postgres.Extension do
def define_functions(conn) do
Enum.each(Functions.list(), fn {name, sql} ->
case :epgsql.squery(conn, sql) do
{:ok, [], []} -> :ok
error -> raise "Failed to define function '#{name}' with error: #{inspect(error)}"
{:ok, [], []} ->
Logger.debug("Successfully (re)defined SQL function/procedure '#{name}'")
:ok

error ->
raise "Failed to define function '#{name}' with error: #{inspect(error)}"
end
end)
end
Expand Down

0 comments on commit 1ed6b9a

Please sign in to comment.