From f9a25f50da8ff61ed3033eb2721ac19baff9a0cb Mon Sep 17 00:00:00 2001 From: Amogh Bharadwaj Date: Thu, 4 Jul 2024 02:52:46 +0530 Subject: [PATCH] Fix syntax for getting postgres peer in Walheartbeat (#1901) Syntax error with "ON" usage in ``` WHERE p.type = $1 AND EXISTS(SELECT * FROM flows f ON p.id = f.source_peer) ``` should be WHERE functionally tested --- flow/activities/flowable_core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/activities/flowable_core.go b/flow/activities/flowable_core.go index 41234ac777..c8b251c9d7 100644 --- a/flow/activities/flowable_core.go +++ b/flow/activities/flowable_core.go @@ -293,7 +293,7 @@ func (a *FlowableActivity) getPostgresPeerConfigs(ctx context.Context) ([]*proto optionRows, err := a.CatalogPool.Query(ctx, ` SELECT p.name, p.options, p.enc_key_id FROM peers p - WHERE p.type = $1 AND EXISTS(SELECT * FROM flows f ON p.id = f.source_peer)`, protos.DBType_POSTGRES) + WHERE p.type = $1 AND EXISTS(SELECT * FROM flows f WHERE p.id = f.source_peer)`, protos.DBType_POSTGRES) if err != nil { return nil, err }