Skip to content

Commit c944012

Browse files
committed
fix: coalesce wal data if not available on list_changes function
1 parent 2994d65 commit c944012

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/extensions/postgres_cdc_rls/replications.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ defmodule Extensions.PostgresCdcRls.Replications do
7676
SELECT wal->>'type' as type,
7777
wal->>'schema' as schema,
7878
wal->>'table' as table,
79-
wal->>'columns' as columns,
80-
wal->>'record' as record,
81-
wal->>'old_record' as old_record,
79+
COALESCE(wal->>'columns', '[]') as columns,
80+
COALESCE(wal->>'record', '{}') as record,
81+
COALESCE(wal->>'old_record', '{}') as old_record,
8282
wal->>'commit_timestamp' as commit_timestamp,
8383
subscription_ids,
8484
errors

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
44
def project do
55
[
66
app: :realtime,
7-
version: "2.67.6",
7+
version: "2.67.7",
88
elixir: "~> 1.18",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,

0 commit comments

Comments
 (0)