Skip to content

Commit

Permalink
Fix syntax for getting postgres peer in Walheartbeat (#1901)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Amogh-Bharadwaj authored Jul 3, 2024
1 parent 84c4573 commit f9a25f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flow/activities/flowable_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f9a25f5

Please sign in to comment.