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

2015-08-27 Thread Igor Sosa Mayor
eless AP. I can not see in the logs anything strange. Since it works well as soon as I restart PG, I will live with this small problem for now. Thanks a lot for your help. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabber

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

2015-08-25 Thread Igor Sosa Mayor
Dave Potts writes: > In cases like this I normally restart the progresql under strace/truss > etc and then wade through the output, it will normally tell me which > process was invoked. Thanks for the hint. I answered you indirectly in other email. -- Sent via pgsql-general mailing list (pgs

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

2015-08-25 Thread Igor Sosa Mayor
Igor Sosa Mayor writes: > Maybe it has something to do with systemd? I'm trying to get all debug A little more information: the unit of postgresql in my systemd looks like this[1]. That means, it is started of course after the network (but maybe there is not any connection avalaib

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

2015-08-25 Thread Igor Sosa Mayor
Adrian Klaver writes: >> But I see that the log options in PG are really rich. Could maybe >> someone tell me which could be the best options to find the problem? I >> will be offline now during 24h, but I will try to make some experiments >> in the meantime. > > From here: > http://www.postgresq

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

2015-08-25 Thread Igor Sosa Mayor
Igor Sosa Mayor writes: > Igor Sosa Mayor writes: > >> My question is therefore: >> 1. is there a way to permit the pl/python to connect to the internet all >>the time and with a better configuration? >> 2. or should I forget the procedure and write a p

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

2015-08-23 Thread Igor Sosa Mayor
Igor Sosa Mayor writes: > My question is therefore: > 1. is there a way to permit the pl/python to connect to the internet all >the time and with a better configuration? > 2. or should I forget the procedure and write a python script outside >the database? I want to updat

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

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: > What is the default system Python? python3. But see my other answer. I dont think this is the problem. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

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

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: >> I tried both... in my system (archlinux) there is plpython2u and >> plpythonu. I think the 2nd one is python3. > > How did they get there? > > Or more to the point how where they built? just installed with postgresql which comes with archlinux. I did not built anything.

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

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: > I tried it here, using your functions, and could not get it to fail: well... i'm happy my function is working... my 1. procedure in PG... Now maybe I'm able to get it working in my laptop... > So it is something to do with the setup on your laptop. yes, or the network I

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

2015-08-23 Thread Igor Sosa Mayor
r python. PG should only run python (2 or 3). IN any case, important is your last thought... I dont see in the doc of PG in the chapter of rules and privileges nothing about privileges to make internet connections... -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG

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

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: > What happens if you run the function below directly in psql and not > through the trigger? exactly the same error. > Do you have both Python 2 and Python 3 on this machine? I have both. > Did you create both the 2u and 3u variants of plpythonu? I tried both... in my

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

2015-08-23 Thread Igor Sosa Mayor
net when I use the function. I dont see any packages. From the python console there is a connection to nominatim (openstreetmap). I think there is exactly the problem: PG does not make any attempt (or it does but it fails even before any package is being sent) to the internet. THnaks for your ideas

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

2015-08-23 Thread Igor Sosa Mayor
"Charles Clavadetscher" writes: > Are you sure that you really use exactly the same code? The indication > "survice unknown" seems to point to an error in the URL and not to an > authorization problem. Maybe some encoding problem? THnaks for your hints. Yes, exactly the same code. Exactly the s

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

2015-08-22 Thread Igor Sosa Mayor
Adrian Klaver writes: > Are you taking lack of coordinates in the table as evidence of no > connection or are you determining that some other way? thanks again for your answer. The evidence is very easy. I get this[1]. BUT: if I try exactly the same python code in a console there is no error and

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

2015-08-22 Thread Igor Sosa Mayor
ection... http://pastie.org/10368578 -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :::: -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

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

2015-08-22 Thread Igor Sosa Mayor
John R Pierce writes: > On 8/22/2015 12:23 AM, Igor Sosa Mayor wrote: >> Somehow I have the impression postgres is trying to make a connection >> without having to rights to get the answer (I'm on linux). I dont >> understand exactly which process (and with which r

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

2015-08-22 Thread Igor Sosa Mayor
the impression postgres is trying to make a connection without having to rights to get the answer (I'm on linux). I dont understand exactly which process (and with which rights) is executing the plpython procedure... Thanks in any case for your answer. -- :: Igor Sosa Mayor :: joseleopo

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

2015-08-21 Thread Igor Sosa Mayor
g/10366558 Then a trigger uses this code to insert the coordinates in a table. Maybe I'm doing something wrong... -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::

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

2015-08-21 Thread Igor Sosa Mayor
nnect to the internet. It works very unreliable. Have you maybe other hints? Many thanks in advance. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :::: -- Sent via pgsql

[GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-20 Thread Igor Sosa Mayor
Many thanks in advance. Igor Sosa Mayor -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :::: -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To mak