Allow making multiple pg_net requests in parallel from a query
#27183
Answered
by
vickkhera
nikodraca
asked this question in
Feature Requests
|
Hi team 👋 I'm wondering if you've considered some way of creating parallel requests based on a query response:
Maybe there's an existing way to do this but I could only find a way to make a single request based on the results of many rows |
Answered by
vickkhera
Jun 13, 2024
Replies: 1 comment 1 reply
|
You can call Assume you have a table called They will all be added to the queue and executed upon completion of that statement (or the transaction if you are inside one). |
1 reply
Answer selected by
nikodraca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can call
net.http_post()as a function in your select, and it will operate on every row that matched.Assume you have a table called
tasksand a column calledpost_datawith the json for the endpoint you want to call with pg_net. Now you can submit all of them at once like this:They will all be added to the queue and executed upon completion of that statement (or the transaction if you are inside one).