Re: https call in PostgreSQL - Mailing list pgsql-admin

From Aldo Sarmiento
Subject Re: https call in PostgreSQL
Date
Msg-id CAHX=r6yKo1EjVcL0dLU-gNqFmFA=Tk_iJWFggya-+Cy69rV0Bw@mail.gmail.com
Whole thread Raw
In response to Re: https call in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: https call in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Is it acceptable practice to make http calls from DB in most cases? I'm assuming if the http service becomes unavailable it could clog up all connections in pg.

I would think adding jobs to some sort of a worker would be a good solution for most applications.

Aldo Sarmiento


On Fri, May 11, 2018 at 11:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Charlin Barak <charlinbarak@gmail.com> writes:
> In Oracle, we use the UTL_HTTP package to make a https call within the
> database. Is there an equivalent in PostgreSQL?

What I'd suggest is using one of the untrusted PLs --- probably plperlu
or plpythonu --- and coding whatever you need in that language.  Once
you're into one of those languages you have access to all the library
packages that are installed for it on the server machine, so it shouldn't
take very much code.

                        regards, tom lane


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: https call in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: https call in PostgreSQL