Re: [GENERAL] problem changing jsonb attribute to null value

2017-11-15 Thread Dmitry Dolgov
> On 15 November 2017 at 22:54, RODRIGUEZ CORTES MARIO IGNACIO < ignacio.cor...@inegi.org.mx> wrote: > > I have a problem with a record in a jsonb type table, I'm trying to > change the value of an attribute to null but it leaves me all the > content in null and not just the value > > prueba=# sele

[GENERAL] problem changing jsonb attribute to null value

2017-11-15 Thread RODRIGUEZ CORTES MARIO IGNACIO
Hello: I have a problem with a record in a jsonb type table, I'm trying to change the value of an attribute to null but it leaves me all the content in null and not just the value, I show you an example first of how to define the null attribute: prueba=# select jsonb_build_object('v', null);  jso

[GENERAL] problem

2017-09-19 Thread Alex Samad
Hi I setup a sync rep cluster 9.6 unfortunately I have made a bit of an issue for myself. my backup site is full on the data partition, which i believe has lead for my write site to be full on the pg_xlog partition - i believe that it is holding logs to replicate and can't any more. so now neit

Re: [GENERAL] Problem with Lateral ?

2017-08-31 Thread Tom Lane
"benj.dev" writes: > I Have a request that produce a bad result. I'm able to rewrite this > request in a form that always produce a good result. It's not at all clear from the amount of info provided whether you've hit a Postgres bug or are just misunderstanding the semantics of your query. Howe

[GENERAL] Problem with Lateral ?

2017-08-31 Thread benj.dev
I Have a request that produce a bad result. I'm able to rewrite this request in a form that always produce a good result. But I don't understand the real reason of the problem. I have tried to simplify the dataset but the problem doesn't appear with less data. The request produce 16 rows (but onl

[GENERAL] Problem during debugging

2017-08-26 Thread Igor Korot
Hi, ALL, I am trying to write a program that is using libpq. For testing purposes I am trying to connect to the remote server, which is running on my home network on a different machine. Sometimes during debugging my program crashes or just produces incorrect results. In this case I have to stop t

Re: [GENERAL] Problem compiling a C function on Windows - not finding _palloc0@4

2017-08-01 Thread Dan Cooperstock at Software4Nonprofits
ehalf Of Dan Cooperstock at Software4Nonprofits Sent: August 1, 2017 12:21 PM To: pgsql-general@postgresql.org Subject: [SPAM] [GENERAL] Problem compiling a C function on Windows - not finding _palloc0@4 I'm trying to compile a C function into a DLL for use in PostgreSQL, with Visual Stu

[GENERAL] Problem compiling a C function on Windows - not finding _palloc0@4

2017-08-01 Thread Dan Cooperstock at Software4Nonprofits
I'm trying to compile a C function into a DLL for use in PostgreSQL, with Visual Studio. I'm linking in postgres.lib, but when the linker runs, I'm getting "unresolved external symbol _palloc0@4 referenced in function _getSoundex@4". The code is just calling palloc0. I suspect it's something about

Re: [GENERAL] Problem with PostgreSQL string sorting Hello All,

2017-02-15 Thread David G. Johnston
On Wed, Feb 15, 2017 at 9:01 AM, Hari Sankar A wrote: > ​[...]​ > > I can use lower() and collate 'C' to get this result. But I need a default > collate to support this. > > Is there any collation that support both (Case insensitive and special > character) sorting in utf8? > > > your help would

[GENERAL] Problem with PostgreSQL string sorting Hello All,

2017-02-15 Thread Hari Sankar A
Hello All, I am a Database administrator and we are using PostgreSQL-9.6.1 version in RHEL-7 linux machine. Current server Encoding setup is UTF8 and LC_COLLATE and LC_CTYPE is en_US.UTF-8. Lets say table person has field name with values likes name -- Abc abc .dcb Dcb $sdf EDF en_US.UTF-8

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-19 Thread Edilmar LISTAS
Em 18-10-2016 16:53, Devrim Gündüz escreveu: Hi, On Mon, 2016-10-17 at 17:38 -0300, Edilmar LISTAS wrote: I have an env running a changed data_directory fine in a devel machine PG 9.4 using Fedora23. Now, I have a server machine with CentOS where I downloaded the RPMs from repo https://downloa

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-18 Thread Devrim Gündüz
Hi, On Mon, 2016-10-17 at 17:38 -0300, Edilmar LISTAS wrote: > I have an env running a changed data_directory fine in a devel machine PG 9.4 > using Fedora23.  > Now, I have a server machine with CentOS where I downloaded the RPMs from > repo https://download.postgresql.org/pub/repos/yum/9.6/redh

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-18 Thread Edilmar LISTAS
Hi, After some tests, really the problem is with original script from PG 9.6 RPM /etc/rc.d/init.d/postgresql-9.6. If I run pg_ctl, start/stop with the new data_directory works fine! Em 18-10-2016 13:49, Edilmar LISTAS escreveu: Em 18-10-2016 11:33, Melvin Davidson escreveu: On Tue, Oct 18

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-18 Thread Edilmar LISTAS
Em 18-10-2016 11:33, Melvin Davidson escreveu: On Tue, Oct 18, 2016 at 10:20 AM, Edilmar LISTAS mailto:edili...@intersite.com.br>> wrote: 1) I changed /etc/rc.d/init.d/postgresql-9.6 like this: PGDATA=/sistemas/sat4/bdpg #PGDATA=/var/lib/pgsql/9.6/data 2) I copied postgresql.c

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-18 Thread Melvin Davidson
On Tue, Oct 18, 2016 at 10:20 AM, Edilmar LISTAS wrote: > 1) I changed /etc/rc.d/init.d/postgresql-9.6 like this: > PGDATA=/sistemas/sat4/bdpg > #PGDATA=/var/lib/pgsql/9.6/data > > 2) I copied postgresql.conf and pg_hba.conf from /var/lib/pgsql/9.6/data > to /sistemas/sat4/bdpg > > 3) I changed p

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-18 Thread Edilmar LISTAS
1) I changed /etc/rc.d/init.d/postgresql-9.6 like this: PGDATA=/sistemas/sat4/bdpg #PGDATA=/var/lib/pgsql/9.6/data 2) I copied postgresql.conf and pg_hba.conf from /var/lib/pgsql/9.6/data to /sistemas/sat4/bdpg 3) I changed postgresql.conf like this: data_directory = '/sistemas/sat4/bdpg' 4)

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-17 Thread Adrian Klaver
On 10/17/2016 01:38 PM, Edilmar LISTAS wrote: I have an env running a changed data_directory fine in a devel machine PG 9.4 using Fedora23. Now, I have a server machine with CentOS where I downloaded the RPMs from repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ce

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-17 Thread Melvin Davidson
On Mon, Oct 17, 2016 at 4:38 PM, Edilmar LISTAS wrote: > I have an env running a changed data_directory fine in a devel machine PG > 9.4 using Fedora23. > Now, I have a server machine with CentOS where I downloaded the RPMs from > repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/ > r

[GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-17 Thread Edilmar LISTAS
I have an env running a changed data_directory fine in a devel machine PG 9.4 using Fedora23. Now, I have a server machine with CentOS where I downloaded the RPMs from repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm.

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread Adrian Klaver
On 08/03/2016 12:11 PM, JotaComm wrote: Hello, 2016-08-03 15:29 GMT-03:00 Adrian Klaver mailto:adrian.kla...@aklaver.com>>: On 08/03/2016 11:24 AM, JotaComm wrote: 2016-08-03 15:20 GMT-03:00 JotaComm mailto:jota.c...@gmail.com>

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread Tom Lane
JotaComm writes: >​The trigger code: > tg_table_update AFTER UPDATE ON parent_table FOR EACH ROW EXECUTE PROCEDURE > f_table_update() I'm fairly sure that per-row triggers only fire on events in their table, ie this would fire on updates to rows in parent_table itself, but not on updates to ro

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread JotaComm
Hello, 2016-08-03 15:29 GMT-03:00 Adrian Klaver : > On 08/03/2016 11:24 AM, JotaComm wrote: > >> >> >> 2016-08-03 15:20 GMT-03:00 JotaComm > >: >> >> > >> ​When I create a trigger for each child table the trigger works very >> well.​ >> > > ​​ > Without seeing

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread Adrian Klaver
On 08/03/2016 11:24 AM, JotaComm wrote: 2016-08-03 15:20 GMT-03:00 JotaComm mailto:jota.c...@gmail.com>>: ​When I create a trigger for each child table the trigger works very well.​ Without seeing any code this problem is not going to be solved. ​Try:

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread JotaComm
2016-08-03 15:20 GMT-03:00 JotaComm : > > > 2016-08-03 15:15 GMT-03:00 JotaComm : > >> Hello, >> >> 2016-08-03 14:21 GMT-03:00 David G. Johnston >> : >> >>> On Wed, Aug 3, 2016 at 1:16 PM, Adrian Klaver >> > wrote: >>> On 08/03/2016 10:12 AM, JotaComm wrote: > Hello, > > I'm

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread David G. Johnston
On Wed, Aug 3, 2016 at 1:16 PM, Adrian Klaver wrote: > On 08/03/2016 10:12 AM, JotaComm wrote: > >> Hello, >> >> I'm working with partitioning and I have one trigger for insert and >> update on parent table, but my trigger is not working for update >> operations. The problem is: the trigger is no

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread Adrian Klaver
On 08/03/2016 10:12 AM, JotaComm wrote: Hello, I'm working with partitioning and I have one trigger for insert and update on parent table, but my trigger is not working for update operations. The problem is: the trigger is not executed for update just for insert. I put a raise notice message in

[GENERAL] Problem with partitioning

2016-08-03 Thread JotaComm
Hello, I'm working with partitioning and I have one trigger for insert and update on parent table, but my trigger is not working for update operations. The problem is: the trigger is not executed for update just for insert. I put a raise notice message in my function to verify the update operation

Re: [GENERAL] Problem after replication switchover

2016-04-07 Thread Lars Arvidson
> If it's just storing the logs, I doubt it's the cause of the problem. You can > ignore my message. I had too much fun fighting with Gluster recently. Hehe, hope you came through on top ;). Anyways, I added an md5sum calculation in the archiving script just to be able to verify that the files d

Re: [GENERAL] Problem after replication switchover

2016-04-06 Thread Alan Hodgson
On Wednesday, April 06, 2016 10:33:16 AM Lars Arvidson wrote: > > I'd guess it's probably more like option 3 - Glusterfs ate my database. > > Hi, thanks for your reply! > We do archive logs on a distributed Glusterfs volume in case the streaming > replication gets too far behind and the transactio

Re: [GENERAL] Problem after replication switchover

2016-04-06 Thread Lars Arvidson
> I'd guess it's probably more like option 3 - Glusterfs ate my database. Hi, thanks for your reply! We do archive logs on a distributed Glusterfs volume in case the streaming replication gets too far behind and the transaction logs have been removed. Would a restore of a corrupt archived log fil

Re: [GENERAL] Problem after replication switchover

2016-04-05 Thread Alan Hodgson
On Tuesday, April 05, 2016 12:55:04 PM Lars Arvidson wrote: > Is there something I missed in the switchover or could this be a bug? > I'd guess it's probably more like option 3 - Glusterfs ate my database. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

[GENERAL] Problem after replication switchover

2016-04-05 Thread Lars Arvidson
Hi, I hope I'm mailing this to the correct mailing list. We get errors inserting into a table: 2016-04-04 07:27:51 CEST [43342-2] @ ERROR: could not read block 28991 in file "base/16390/572026": read only 0 of 8192 bytes 2016-04-04 07:27:51 CEST [43342-3] @ STATEMENT: INSERT INTO (...) VALUES

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

2015-08-27 Thread Igor Sosa Mayor
Adrian Klaver writes: > Best guess, since this is a laptop, the network is not connected until > NetworkManager(or something similar) is active. On my laptop that > happens late in the startup sequence, after Postgres starts. This is > especially true if you are connecting to a wireless AP. I ca

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

2015-08-25 Thread Adrian Klaver
On 08/25/2015 01:30 AM, Igor Sosa Mayor wrote: 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 pyt

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 avalaible?) [1] [Unit

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 python script outside >>the database

Re: [GENERAL] Problem with database connections timing out for long-running queries

2015-08-24 Thread Rich Schaaf
Schaaf Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Problem with database connections timing out for long-running queries You might check the stunnel settings. A quick search of "stunnel 12-hours" indicates that this is the stunnel default for idle connections. Chee

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 01:15 PM, Igor Sosa Mayor wrote: 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

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 update the situation

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

2015-08-23 Thread Dave Potts
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. On 23/08/15 18:49, Tom Lane wrote: > Igor Sosa Mayor writes: >> Adrian Klaver writes: >>> Or more to the point how where they built? >>

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

2015-08-23 Thread John R Pierce
On 8/23/2015 10:49 AM, Tom Lane wrote: However, what this smells like to me is a permissions problem. I think you were way too quick to dismiss the idea that SELinux (or something just like it) is restricting outbound internet connections from Postgres. It's standard for SELinux to be configured

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

2015-08-23 Thread Tom Lane
Igor Sosa Mayor writes: > Adrian Klaver writes: >> Or more to the point how where they built? > just installed with postgresql which comes with archlinux. I did not > built anything. But, really: I dont think the problem is plpython2u o 3: > 1. I have in my system both and both have the same lib

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 10:38 AM, Igor Sosa Mayor wrote: 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 wi

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 s d
On 23 August 2015 at 18:59, Igor Sosa Mayor wrote: > s d writes: > > > It might be a dumb thought, but... > > thanks. There are not dumb thoughts with such problems... > > > Did you run the script from ipython as postgres user? > > External programs called by triggers run as postgres, and maybe

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 10:02 AM, Igor Sosa Mayor wrote: 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

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 09:53 AM, Igor Sosa Mayor wrote: 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 v

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 09:53 AM, Igor Sosa Mayor wrote: 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 v

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
s d writes: > It might be a dumb thought, but... thanks. There are not dumb thoughts with such problems... > Did you run the script from ipython as postgres user? > External programs called by triggers run as postgres, and maybe your > postgres user doesn't have rights to reach the remote servi

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
"Charles Clavadetscher" writes: >> Yes, exactly the same code. Exactly the same query: two consoles, one with >> postgres, other with ipython. Postgres gives the error; ipython works. > > Somehow I expected that answer. I am not a python expert, but it happens > that different pieces of code at t

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 12:09 AM, Igor Sosa Mayor wrote: "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 hint

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

2015-08-23 Thread s d
It might be a dumb thought, but... Did you run the script from ipython as postgres user? External programs called by triggers run as postgres, and maybe your postgres user doesn't have rights to reach the remote service. Regards, Sandor On 23 August 2015 at 09:09, Igor Sosa Mayor wrote: > "Ch

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

2015-08-23 Thread Adrian Klaver
On 08/23/2015 12:09 AM, Igor Sosa Mayor wrote: "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 hint

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

2015-08-23 Thread Charles Clavadetscher
Hi Weird. According to http://geopy.readthedocs.org/en/latest/#geopy.exc.GeocoderServiceError this is the most generic exception, only used when there is not a more specific one (which include by the way problems caused by connectivity and authorization). The message of the exception is supposed t

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 Charles Clavadetscher
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Igor Sosa Mayor > Sent: Sonntag, 23. August 2015 07:22 > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Problem with pl/python procedure

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 Adrian Klaver
On 08/22/2015 10:16 AM, Igor Sosa Mayor wrote: Adrian Klaver writes: Is the function you show here: http://pastie.org/10366558 the actual function you are using in the trigger? If so, there is no mechanism for getting the location coordinates into the table, if that is what you want. th

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

2015-08-22 Thread Igor Sosa Mayor
Adrian Klaver writes: > Is the function you show here: > > http://pastie.org/10366558 > > the actual function you are using in the trigger? > > If so, there is no mechanism for getting the location coordinates into > the table, if that is what you want. > this is the function and there is a tri

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

2015-08-22 Thread Adrian Klaver
On 08/22/2015 12:23 AM, Igor Sosa Mayor wrote: Adrian Klaver writes: 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

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 rights) is executing >> the plpyt

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

2015-08-22 Thread John R Pierce
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 rights) is executing the plpython procedure... Thanks in any case

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

2015-08-22 Thread Igor Sosa Mayor
Adrian Klaver writes: > 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 thi

Re: [GENERAL] Problem with database connections timing out for long-running queries

2015-08-21 Thread Steve Crawford
You might check the stunnel settings. A quick search of "stunnel 12-hours" indicates that this is the stunnel default for idle connections. Cheers, Steve On Fri, Aug 21, 2015 at 11:16 AM, Rich Schaaf wrote: > I’m running into a problem where the connection between application its > database is

Re: [GENERAL] Problem with database connections timing out for long-running queries

2015-08-21 Thread Adrian Klaver
On 08/21/2015 11:16 AM, Rich Schaaf wrote: I’m running into a problem where the connection between application its database is timing out after 12 hours. Here’s the context: ·Two servers (one running the application and another hosting the database) in the Amazon AWS environment on different su

[GENERAL] Problem with database connections timing out for long-running queries

2015-08-21 Thread Rich Schaaf
I'm running into a problem where the connection between application its database is timing out after 12 hours. Here's the context: . Two servers (one running the application and another hosting the database) in the Amazon AWS environment on different subnets within a virtual private cl

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

2015-08-21 Thread Adrian Klaver
On 08/21/2015 08:38 AM, Igor Sosa Mayor wrote: Adrian Klaver 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 i

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

2015-08-21 Thread Igor Sosa Mayor
Adrian Klaver 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

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

2015-08-21 Thread Igor Sosa Mayor
John R Pierce writes: > listen_addresses should only affect the interfaces that the postgres > server is listening to connections from. as long as your app is on > the same machine, and uses localhost:someport to connect to the > postgres server, then the default listen_addresses='localhost' sh

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

2015-08-21 Thread Adrian Klaver
On 08/21/2015 12:34 AM, John R Pierce wrote: listen_addresses should only affect the interfaces that the postgres server is listening to connections from. as long as your app is on the same machine, and uses localhost:someport to connect to the postgres server, then the default listen_addresses

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

2015-08-21 Thread Adrian Klaver
On 08/20/2015 10:30 PM, Igor Sosa Mayor wrote: Hi, I'm a beginner with pgsql and have the following problem. I have written a pl/python procedure to query geolocations (with the library geopy). It inserts them into a table. All this works perfectly. The problem is the configuration with the net

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

2015-08-21 Thread John R Pierce
listen_addresses should only affect the interfaces that the postgres server is listening to connections from. as long as your app is on the same machine, and uses localhost:someport to connect to the postgres server, then the default listen_addresses='localhost' should be sufficient.' if you

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

2015-08-20 Thread Igor Sosa Mayor
Hi, I'm a beginner with pgsql and have the following problem. I have written a pl/python procedure to query geolocations (with the library geopy). It inserts them into a table. All this works perfectly. The problem is the configuration with the network connections. I'm using pgsql in a private la

Re: [GENERAL] Problem building both Python 2 and 3 into Postgres 9.4.4?

2015-07-20 Thread pbj
: Re: [GENERAL] Problem building both Python 2 and 3 into Postgres 9.4.4? To: p...@cmicdo.com Cc: pgsql-general@postgresql.org Date: Sunday, July 19, 2015, 4:54 PM p...@cmicdo.com writes: > Has anyone successfully built Python 2 and 3 into the same installation > of Postgres 9.4.4?

Re: [GENERAL] Problem building both Python 2 and 3 into Postgres 9.4.4?

2015-07-19 Thread Tom Lane
p...@cmicdo.com writes: > Has anyone successfully built Python 2 and 3 into the same installation > of Postgres 9.4.4? I do not think you can do it like this: > make distclean > ./configure --with-openssl --with-libxml --with-libxslt --with-python > PYTHON=/usr/bin/python > make > ./configure --

[GENERAL] Problem building both Python 2 and 3 into Postgres 9.4.4?

2015-07-19 Thread pbj
Has anyone successfully built Python 2 and 3 into the same installation of Postgres 9.4.4? I tried it today on Ubuntu 10.04, Python 2.6.5, Python 3.1.2 and got and error about undefined symbol: PyString_AsString. The Python docs say that PyString_* have been renamed to PyBytes_* and I find referen

Re: [GENERAL] Problem with ALTER TYPE, Indexes and cast

2015-07-08 Thread Marc Mamin
> -Original Message- > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Mittwoch, 8. Juli 2015 15:44 > To: Marc Mamin > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Problem with ALTER TYPE, Indexes and cast > > Marc Mamin writes: > > Now

Re: [GENERAL] Problem with ALTER TYPE, Indexes and cast

2015-07-08 Thread Tom Lane
Marc Mamin writes: > Now I have generated queries that include cast information in order to ensure > that the indexes get used. > e.g.: WHERE month1.foo = cast('XY' as character(2)) > with mixed type, this should become something like: > SELECT ... FROM month1 > WHERE month1.foo = cast('XY'

[GENERAL] Problem with ALTER TYPE, Indexes and cast

2015-07-08 Thread Marc Mamin
Hello, I plan to replace some btree indexes through btree_gin on some timed tables(e.g. monthly tables) For this, I first need to change the data type from character(n) to varchar, but I can't afford it on historical tables as this would be too time consuming, so only new tables should get the

Re: [GENERAL] Problem when temp_tablespace get full?

2015-06-03 Thread Jan Lentfer
Am 2015-06-03 19:00, schrieb Daniel Begin: Sorry, my question might not have been clear… I set myself the temp_tablespace to that location but did not expect the drive could get full; Multiple factors may have caused the drive to turn off (not necessarily postgresql); So, if that temp_tablespa

Re: [GENERAL] Problem when temp_tablespace get full?

2015-06-03 Thread Daniel Begin
react/manage the situation? Daniel From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G. Johnston Sent: June-03-15 11:54 To: Daniel Begin Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Problem when temp_tablespace get full? On

Re: [GENERAL] Problem when temp_tablespace get full?

2015-06-03 Thread David G. Johnston
On Wed, Jun 3, 2015 at 11:14 AM, Daniel Begin wrote: > > A query > ​OK...​ But ma question is: What append the temp_tablespace drive get full? > ​The query, probably... "There is also a temp_tablespaces parameter, which determines the placement of temporary tables and indexes, as well as temp

[GENERAL] Problem when temp_tablespace get full?

2015-06-03 Thread Daniel Begin
Context. A query almost filled a SSD drive (temp_tablespace) and my PC got unresponsive; I did SELECT pg_cancel_backend(6600); 6600 was the pid of the process and got a successful answer (t) However, just after that, the disk simply turned off and the system crashed. I was able to restart the P

Re: [GENERAL] Problem JDBC, AutoCommit ON and SELECT FOR UPDATE

2015-03-06 Thread Thomas Kellerer
Philippe EMERIAUD wrote on 06.03.2015 17:27: Hi all, We have an application based on DB2 database, We are testing this same application on PostgreSQL database. By default we are in autocommit on mode. On DB2 (and Oracle), the query SELECT FOR UPDATE locks the row until the resultset is closed.

Re: [GENERAL] Problem JDBC, AutoCommit ON and SELECT FOR UPDATE

2015-03-06 Thread Dave Cramer
Can you point me to the source of that quote ? The documentation here http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html does not specify anything about ResultSet closing, or completion ? Short version is that the driver does not hold the lock past the return of the result set, so

Re: [GENERAL] Problem JDBC, AutoCommit ON and SELECT FOR UPDATE

2015-03-06 Thread Adrian Klaver
On 03/06/2015 08:27 AM, Philippe EMERIAUD wrote: Hi all, We have an application based on DB2 database, We are testing this same application on PostgreSQL database. By default we are in autocommit on mode. On DB2 (and Oracle), the query SELECT FOR UPDATE locks the row until the resultset is closed

[GENERAL] Problem JDBC, AutoCommit ON and SELECT FOR UPDATE

2015-03-06 Thread Philippe EMERIAUD
Hi all, We have an application based on DB2 database, We are testing this same application on PostgreSQL database. By default we are in autocommit on mode. On DB2 (and Oracle), the query SELECT FOR UPDATE locks the row until the resultset is closed. On PostgreSQL database (all versions) this sam

Re: [GENERAL] Problem with REFERENCES on INHERITS

2015-02-02 Thread William Gordon Rutherdale
On 02/02/15 10:11 AM, Tom Lane wrote: > If you did "select * from only primate" you would see that there is no > such row in the parent table, which is what the foreign key is being > enforced against. Thanks. That does a lot to clarify it. -Will -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Problem with REFERENCES on INHERITS

2015-02-02 Thread Tom Lane
William Gordon Rutherdale writes: > So this statement: > INSERT INTO banana_stash(primate_id, qty) VALUES (1, 17); > Resulted in this error: > ERROR: insert or update on table "banana_stash" violates foreign key > constraint "banana_stash_primate_id_fkey" > DETAIL: Key (primate_id)=(1) is not pr

Re: [GENERAL] Problem with REFERENCES on INHERITS

2015-02-02 Thread William Gordon Rutherdale
On 02/02/15 12:11 AM, David G Johnston wrote: > William Gordon Rutherdale wrote >> My problem: could someone please explain the semantics and why this >> behaviour makes sense -- or is it a design error or bug? > I didn't read your post in depth but I suspect you have not read and > understood th

Re: [GENERAL] Problem with REFERENCES on INHERITS

2015-02-01 Thread David G Johnston
William Gordon Rutherdale wrote > I have encountered a problem with references when using INHERITS (on > Postgres 9.1/9.2). Could someone please explain why this occurs. > > My problem: could someone please explain the semantics and why this > behaviour makes sense -- or is it a design error or

[GENERAL] Problem with REFERENCES on INHERITS

2015-02-01 Thread William Gordon Rutherdale
Hi. I have encountered a problem with references when using INHERITS (on Postgres 9.1/9.2). Could someone please explain why this occurs. Consider this example. CREATE TABLE primate ( id SERIAL PRIMARY KEY, name TEXT, tale TEXT ); CREATE TABLE chimp ( human_friend TEXT ) INHERITS

Re: [GENERAL] Problem with unixODBC and PostgreSQL

2015-01-22 Thread Adrian Klaver
On 01/22/2015 08:35 AM, Julie Reier wrote: Hi. I am hoping that someone can advise me on an issue I am having with connecting to a postgresql DB via unixODBC. I am using an ubuntu VM to test the configuration. Here’s what I did: 1. Installed unixODBC 2. Installed odbc-postgresql 3. Configure

[GENERAL] Problem with unixODBC and PostgreSQL

2015-01-22 Thread Julie Reier
Hi. I am hoping that someone can advise me on an issue I am having with connecting to a postgresql DB via unixODBC. I am using an ubuntu VM to test the configuration. Here’s what I did: 1. Installed unixODBC 2. Installed odbc-postgresql 3. Configured odbc drivers and data sources. I am

Re: [GENERAL] Problem with constraint exclusion on partitions

2014-12-20 Thread David G Johnston
David G Johnston wrote > On Saturday, December 20, 2014, Mike Pultz [via PostgreSQL] < > ml-node+s1045698n5831551h5@.nabble >> wrote: > >> Hey David, >> >> > What version are you using? >> >> Sorry, I'm on 9.3.4. >> >> >Now() is a volatile function so the planner cannot omit partitions. >> > >>

  1   2   3   4   5   6   7   8   9   10   >