Skip to content
Discussion options

You must be logged in to vote

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 tasks and a column called post_data with the json for the endpoint you want to call with pg_net. Now you can submit all of them at once like this:

select net.http_post('http://example.com', post_data) from tasks;

They will all be added to the queue and executed upon completion of that statement (or the transaction if you are inside one).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nikodraca
Comment options

Answer selected by nikodraca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants