From 9967be5985317dbb50bb9ec18f4aa09e44b61291 Mon Sep 17 00:00:00 2001 From: exitxhu <59249127+exitxhu@users.noreply.github.com> Date: Tue, 7 May 2024 17:48:52 +0330 Subject: [PATCH] fix GetColumns script (#1681) fix this issue: https://github.com/PeerDB-io/peerdb/issues/1680 --- flow/cmd/peer_data.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/cmd/peer_data.go b/flow/cmd/peer_data.go index ee514e2dfc..c88cb0c868 100644 --- a/flow/cmd/peer_data.go +++ b/flow/cmd/peer_data.go @@ -205,11 +205,13 @@ func (h *FlowRequestHandler) GetColumns( pg_attribute JOIN pg_class ON pg_attribute.attrelid = pg_class.oid + JOIN + pg_namespace on pg_class.relnamespace = pg_namespace.oid LEFT JOIN pg_constraint ON pg_attribute.attrelid = pg_constraint.conrelid AND pg_attribute.attnum = ANY(pg_constraint.conkey) WHERE - relnamespace::regnamespace::text = $1 + pg_namespace.nspname = $1 AND relname = $2 AND pg_attribute.attnum > 0