Re: Problem with pl/python procedure connecting to the internet

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Igor Sosa Mayor <joseleopoldo1792(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with pl/python procedure connecting to the internet
Date: 2015-08-21 21:01:14
Message-ID: 55D7919A.8090001@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/21/2015 08:38 AM, Igor Sosa Mayor wrote:
> Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
>
>> Are you talking about getting data into the procedure, or out of it,
>> or both?
>
> [...]
> (I reduce your email only to this question in order to be clearer; sorry
> for this).
>
> thanks for your answer.
>
> To your questions: my setup is very easy and primitive:
> 1. postgres is in my laptop; I'm the only user and I will be the only
> user of the system;
> 2. the script is also in my laptop;
> 3. the only thing which connects to the internet is the plpython I
> wrote: it gets coordinates from Openstreetmap. The code I'm using is
> the following: http://pastie.org/10366558
>
> Then a trigger uses this code to insert the coordinates in a table.
> Maybe I'm doing something wrong...

Does the code work reliably outside Postgres?
It seems you are reliant on the availability of the OpenStreetMap
service and its ability to provide a timely response.

So what exactly is the trigger event, INSERT, UPDATE, both?

Is it absolutely necessary that this happen in a trigger?

>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ali Panjwani 2015-08-21 21:14:02
Previous Message Alvaro Herrera 2015-08-21 20:44:49 Re: 9.5 beta pg_upgrade documentation