Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Adrian Klaver
On 04/09/2017 05:30 PM, John Iliffe wrote: On Sunday 09 April 2017 20:01:32 Adrian Klaver wrote: So the issue is in PHP via Apache using the socket, because if I remember right you used localhost in the Apache/PHP combination and it worked, correct? Yes. I think there is some confusion here

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread rob stone
On Sun, 2017-04-09 at 20:09 -0400, John Iliffe wrote: > > >  > > You have Apache, PHP, and Postgres all running on your LAN at > > 192.168.1.6. > >  > >  > > You are on 192.168.1.10. > >  > > Your NOT doing "php -f testfcgi.php", so how does Apache "know" to > run > > that script? > > testfcgi.

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 20:07:01 Adrian Klaver wrote: > On 04/09/2017 03:27 PM, rob stone wrote: > > Hello John, > > > > Just saw this message. > > > >> Still set to the default: > >> > >> #listen_addresses = 'localhost' # what IP address(es) to > >> listen on; > >> > >>

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 20:01:32 Adrian Klaver wrote: > On 04/09/2017 02:35 PM, John Iliffe wrote: > > On Sunday 09 April 2017 17:02:47 Adrian Klaver wrote: > >> On 04/09/2017 02:00 PM, John Iliffe wrote: > >>> On Sunday 09 April 2017 15:38:10 Adrian Klaver wrote: > Remember host != local > >>

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 18:27:49 rob stone wrote: Hi Rob: Thanks for chiming in. > Hello John, > > Just saw this message. > > > Still set to the default: > > > > #listen_addresses = 'localhost' # what IP address(es) to > > listen on; > > # comma-

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Adrian Klaver
On 04/09/2017 03:27 PM, rob stone wrote: Hello John, Just saw this message. Still set to the default: #listen_addresses = 'localhost' # what IP address(es) to listen on; # comma-separated list of addresses;

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Adrian Klaver
On 04/09/2017 02:35 PM, John Iliffe wrote: On Sunday 09 April 2017 17:02:47 Adrian Klaver wrote: On 04/09/2017 02:00 PM, John Iliffe wrote: On Sunday 09 April 2017 15:38:10 Adrian Klaver wrote: Remember host != local host is for IP connections local is for socket connections Yes, I had for

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 17:39:30 rob stone wrote: > Hello John, > > > > > > > > > > > PHP and Postgresql are both running on same box. It does have > > > > two > > > > > > interfaces, 192.168.1.6 and 192.168.1.7, and the test programme > > > > is > > > > > > available on either. The referen

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread rob stone
Hello John, Just saw this message. > > Still set to the default: > > #listen_addresses = 'localhost' # what IP address(es) to > listen on; >     # comma-separated list of  > addresses; >     # defaults to 'localhos

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread rob stone
Hello John, > >  > > > PHP and Postgresql are both running on same box.  It does have > two > > > interfaces, 192.168.1.6 and 192.168.1.7, and the test programme > is > > > available on either.  The reference to 192.168.1.10 is the client > > > machine, in this case my workstation, which is 192.1

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 17:02:47 Adrian Klaver wrote: > On 04/09/2017 02:00 PM, John Iliffe wrote: > > On Sunday 09 April 2017 15:38:10 Adrian Klaver wrote: > >> Remember host != local > >> > >> host is for IP connections > >> > >> local is for socket connections > > > > Yes, I had forgotten tha

[GENERAL] Are multiple array_aggs going to be in the same order?

2017-04-09 Thread Guyren Howe
If I do a SELECT with a GROUP_BY and multiple ARRAY_AGGs, will the ARRAY_AGGs be guaranteed to have entries in the same (ie corresponding) order? eg SELECT u.name, ARRAY_AGG(o.order_date) AS order_dates, ARRAY_AGG(o.order_total) AS order_totals FROM user u JOIN

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Adrian Klaver
On 04/09/2017 02:00 PM, John Iliffe wrote: On Sunday 09 April 2017 15:38:10 Adrian Klaver wrote: Remember host != local host is for IP connections local is for socket connections Yes, I had forgotten that for the moment. I have the following line in the 'local' section of the pg_hba.conf

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 15:38:10 Adrian Klaver wrote: > On 04/09/2017 12:37 PM, John Iliffe wrote: > > On Sunday 09 April 2017 14:34:01 Joe Conway wrote: > >> On 04/09/2017 11:33 AM, John Iliffe wrote: > >>> On Saturday 08 April 2017 18:10:35 Joe Conway wrote: > On 04/08/2017 01:23 PM, John Il

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 15:41:12 Joe Conway wrote: > On 04/09/2017 12:37 PM, John Iliffe wrote: > >> > Thanks Joe. I Changed the pg_connect line in the script to: > >> > $db_handle = pg_connect('dbname=yrarc host=192.168.1.6 port=5432 > >> > > >> > user= password=xx'); > > > > If I may

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Joe Conway
On 04/09/2017 12:37 PM, John Iliffe wrote: >> > Thanks Joe. I Changed the pg_connect line in the script to: >> > $db_handle = pg_connect('dbname=yrarc host=192.168.1.6 port=5432 >> > user= password=xx'); > If I may be permitted a rant at this point, the Fedora documentation is > almost

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Adrian Klaver
On 04/09/2017 12:37 PM, John Iliffe wrote: On Sunday 09 April 2017 14:34:01 Joe Conway wrote: On 04/09/2017 11:33 AM, John Iliffe wrote: On Saturday 08 April 2017 18:10:35 Joe Conway wrote: On 04/08/2017 01:23 PM, John Iliffe wrote: On Saturday 08 April 2017 09:38:07 Adrian Klaver wrote: So

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 15:05:18 Adrian Klaver wrote: > On 04/09/2017 11:33 AM, John Iliffe wrote: > > On Saturday 08 April 2017 18:10:35 Joe Conway wrote: > >> On 04/08/2017 01:23 PM, John Iliffe wrote: > >>> On Saturday 08 April 2017 09:38:07 Adrian Klaver wrote: > So what if you change the

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Sunday 09 April 2017 14:34:01 Joe Conway wrote: > On 04/09/2017 11:33 AM, John Iliffe wrote: > > On Saturday 08 April 2017 18:10:35 Joe Conway wrote: > >> On 04/08/2017 01:23 PM, John Iliffe wrote: > >> > On Saturday 08 April 2017 09:38:07 Adrian Klaver wrote: > >> >> So what if you change the c

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Saturday 08 April 2017 11:20:29 Joe Conway wrote: > On 04/08/2017 06:31 AM, John Iliffe wrote: > > On Saturday 08 April 2017 00:10:14 Adrian Klaver wrote: > >> On 04/07/2017 07:45 PM, Joe Conway wrote: > >> > On 04/07/2017 05:35 PM, Adrian Klaver wrote: > >> >> On 04/07/2017 05:03 PM, John Iliff

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Adrian Klaver
On 04/09/2017 11:33 AM, John Iliffe wrote: On Saturday 08 April 2017 18:10:35 Joe Conway wrote: On 04/08/2017 01:23 PM, John Iliffe wrote: On Saturday 08 April 2017 09:38:07 Adrian Klaver wrote: So what if you change the connection to use -h localhost? Can you please expand on that request?

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread Joe Conway
On 04/09/2017 11:33 AM, John Iliffe wrote: > On Saturday 08 April 2017 18:10:35 Joe Conway wrote: >> On 04/08/2017 01:23 PM, John Iliffe wrote: >> > On Saturday 08 April 2017 09:38:07 Adrian Klaver wrote: >> >> So what if you change the connection to use -h localhost? >> > >> > Can you please expa

Re: [GENERAL] Unable to connect to Postgresql

2017-04-09 Thread John Iliffe
On Saturday 08 April 2017 18:10:35 Joe Conway wrote: > On 04/08/2017 01:23 PM, John Iliffe wrote: > > On Saturday 08 April 2017 09:38:07 Adrian Klaver wrote: > >> So what if you change the connection to use -h localhost? > > > > Can you please expand on that request? I'm not sure where you want m

Re: [GENERAL] Aggregate query on large tables

2017-04-09 Thread Adrian Klaver
On 04/09/2017 08:05 AM, Job wrote: Hi, i have a table with about 400 millions of rows and i need to build some aggregate function for reporting. I noticed that query performances are slowing down, even though indexes are present. Query is simple (i make an example, my table is in italian lang

Re: [GENERAL] Aggregate query on large tables

2017-04-09 Thread Bill Moran
On Sun, 9 Apr 2017 17:05:56 +0200 Job wrote: > Hi, > > i have a table with about 400 millions of rows and i need to build some > aggregate function for reporting. > I noticed that query performances are slowing down, even though indexes are > present. > > Query is simple (i make an example, m

[GENERAL] Aggregate query on large tables

2017-04-09 Thread Job
Hi, i have a table with about 400 millions of rows and i need to build some aggregate function for reporting. I noticed that query performances are slowing down, even though indexes are present. Query is simple (i make an example, my table is in italian language): select a,sum(b) from table whe

Re: [GENERAL] TimeScaleDB -- Open Source Time Series Database Released (www.i-programmer.info);

2017-04-09 Thread Nicolas Paris
Le 09 avril 2017 à 05:31, Steve Petrie, P.Eng. écrivait : > Warm Greetings To pgsql-general@postgresql.org > > (I am a very newbie user of PG for a pretty trivial PHP / SQL web app. Been > lurking with great admiration for a long time, on the > pgsql-general@postgresql.org discussion list channel.

Re: [GENERAL] Nullsif ? PG 9.1

2017-04-09 Thread Patrick B
2017-04-09 20:18 GMT+12:00 Patrick B : > Hi guys, > > I've got this select: > SELECT split_part(n.node_full_path::text, '/'::text, 8)::integer AS id, > > However, not always I will get the 8th field, and because of that, i may > get no data somethings. > > Example: > /filesuser/client/27801123/at

[GENERAL] Nullsif ? PG 9.1

2017-04-09 Thread Patrick B
Hi guys, I've got this select: SELECT split_part(n.node_full_path::text, '/'::text, 8)::integer AS id, However, not always I will get the 8th field, and because of that, i may get no data somethings. Example: /filesuser/client/27801123/attachment/4510/main /filesuser/client//attachment/2131