Re: [GENERAL] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Andre Mikulec
Tom, O.K., I re-wrote my ./configure to start with ./configure PYTHON=/c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3/python.exe ... etc ... Thanks that works right now. checking for python... /c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3/python.exe checking for Python distutils module...

Re: [GENERAL] configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .

2016-10-20 Thread John R Pierce
On 10/20/2016 10:37 PM, Andre Mikulec wrote: I m getting this. TargetUser@TARGETMACH ~ $ perl -v This is perl, v5.8.8 built for msys-64int 5.8.8 is not right. See later emails. try /c/EnterpriseDB/LanguagePack/9.5/x64/Perl-5.20/bin/perl -v as the perl in your default system path is probabl

Re: [GENERAL] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Andre Mikulec
Adrian, I am sorry. I am not trying to use the Language Packs, to build my own custom version of a Language. I mispoke myself. Thanks, Andre Mikulec andre_miku...@hotmail.com From: Adrian Klaver Sent: Thursday, October 20, 2016 9:58 AM To: Andre Mikulec; pgs

Re: [GENERAL] configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .

2016-10-20 Thread Andre Mikulec
Tom, I m getting this. TargetUser@TARGETMACH ~ $ perl -v This is perl, v5.8.8 built for msys-64int 5.8.8 is not right. See later emails. Andre Mikulec andre_miku...@hotmail.com From: Tom Lane Sent: Thursday, October 20, 2016 9:54 AM To: Andre Mikulec Cc: pgsq

Re: [GENERAL] text_pattern_ops index not being used for prefix query

2016-10-20 Thread Maxim Boguk
On Fri, Oct 21, 2016 at 8:42 AM, Alexander Staubo wrote: > Indexing on a text column: > > create index index_documents_on_id_with_pattern_ops (id > text_pattern_ops); > > This works fine: > > > explain select id from documents where id like 'dingbat%'; > Index Only Scan using index_do

[GENERAL] text_pattern_ops index not being used for prefix query

2016-10-20 Thread Alexander Staubo
Indexing on a text column: create index index_documents_on_id_with_pattern_ops (id text_pattern_ops); This works fine: > explain select id from documents where id like 'dingbat%'; Index Only Scan using index_documents_on_id_with_pattern_ops on documents (cost=0.56..8.58 rows=736 wi

Re: [GENERAL] Showing matrix with single query

2016-10-20 Thread David G. Johnston
On Thu, Oct 20, 2016 at 6:07 AM, Арсений Нестюк wrote: > Hello everyone. > > I'm trying to solve the following problem: > There's a table (row int, col int, val int) that represents some matrix. > The number of columns in the matrix is arbitrary. I need to show the matrix > in the usual form, wit

[GENERAL] Showing matrix with single query

2016-10-20 Thread Арсений Нестюк
Hello everyone. I'm trying to solve the following problem: There's a table (row int, col int, val int) that represents some matrix. The number of columns in the matrix is arbitrary. I need to show the matrix in the usual form, with columns being the columns of the matrix. So, from the table {(0,0,

Re: [GENERAL] out-of-order XID insertion in KnownAssignedXids

2016-10-20 Thread Andres Freund
On 2016-10-20 22:37:15 +0900, Michael Paquier wrote: > On Thu, Oct 20, 2016 at 10:21 PM, wrote: > > - remove a file called backup_label, but I am not certain that this file is > > in fact there (any more). > > It is never a good idea when you are trying to restore from a backup, > backup_label c

Re: [GENERAL] Postgresql apt repository naming scheme question

2016-10-20 Thread John R Pierce
On 10/18/2016 11:12 AM, Jacob Scott wrote: Is it safe/recommended to use the latest released libpq-dev package rather than one which matches the major version of the serrver/client packages being installed? Or should I be manually using the morgue as described in https://www.postgresql.org/mes

Re: [GENERAL] Unnest an array in postgresql

2016-10-20 Thread David G. Johnston
On Thu, Oct 20, 2016 at 2:40 AM, Jaisingkar, Piyush < piyush.jaising...@nttdata.com> wrote: > Hello, > > > > > > I am trying to run following query in a function: > > > > > > CREATE TEMP TABLE temptable on commit drop as (Select * from > unnest(string_to_array(temp1,',')) as (rep_id int,install_up

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Scott Marlowe
On Thu, Oct 20, 2016 at 6:27 AM, Bjørn T Johansen wrote: > On Thu, 20 Oct 2016 14:04:51 +0200 > vinny wrote: > >> On 2016-10-20 13:51, Bjørn T Johansen wrote: >> > I have the following SQL: >> > >> > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 >> > 00:00:00','DD.MM. HH24:M

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Francisco Olarte
Bjørn: On Thu, Oct 20, 2016 at 4:13 PM, Bjørn T Johansen wrote: > Yes, the field name is actually dato but changed it to the English variant.. I routinely have databases with english column names for nearly everything except 'fecha', spanish for date, and 'tipo', spanish for type which sometime

Re: [GENERAL] make PostgreSQL with TCLSH: No rule to make target

2016-10-20 Thread Tom Lane
Andre Mikulec writes: > I am trying to configure PostgreSQL with the pltcl language available. You're not having any luck with PLs at all, are you? > $ ./configure TCLSH=/c/EnterpriseDB/LanguagePack/9.5/x64/Tcl-8.5/bin I seriously doubt that that's a correct value for TCLSH; the variable is sup

Re: [GENERAL] Sequences / Replication

2016-10-20 Thread Alvaro Aguayo Garcia-Rada
Hi. If the explanation given on one of the stackoverflow responses is right, then there's no current solution for that. But I would go a little bit further: is it a real problem? I mean, even being a bug, it does not disrupts the basic behaviour of the sequences: that each successive call to ne

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Bjørn T Johansen
On Thu, 20 Oct 2016 15:16:20 +0200 Francisco Olarte wrote: > On Thu, Oct 20, 2016 at 1:51 PM, Bjørn T Johansen wrote: > > I have the following SQL: > > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 > > 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10.2016 > > 23:59:

Re: [GENERAL] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Tom Lane
Andre Mikulec writes: > I am trying to configure PostgreSQL with the plpython language available. > Here is my ./configure line > $ ./configure PYTHON=/c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3 > --with-python --with-includes=/c/EnterpriseDB/Lang Are you sure that that PYTHON specificatio

Re: [GENERAL] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Adrian Klaver
On 10/20/2016 07:03 AM, Tom Lane wrote: Andre Mikulec writes: I am trying to configure PostgreSQL with the plpython language available. Here is my ./configure line $ ./configure PYTHON=/c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3 --with-python --with-includes=/c/EnterpriseDB/Lang Ar

Re: [GENERAL] Postgres upgrade from 9.4.9 to 9.6 using pg_upgrade error

2016-10-20 Thread Bruce Momjian
On Tue, Oct 18, 2016 at 10:15:47PM +, Ashish Chauhan wrote: > · I am getting below error while executing above command: > > command: "/usr/lib/postgresql/9.4/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D > "/var/lib/postgresql/9.4/main" -o "-p 50432 -b -c config_file=/etc/postgresql/ >

Re: [GENERAL] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Adrian Klaver
On 10/20/2016 06:44 AM, Andre Mikulec wrote: Hi, For this and your subsequent posts. Did you install Postgres from the EDB installer? If so then: http://forums.enterprisedb.com/posts/list/4312.page#15381 http://get.enterprisedb.com/docs/README-edb-languagepack-9.6.txt If not then you ca

Re: [GENERAL] configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .

2016-10-20 Thread Tom Lane
Andre Mikulec writes: > I am getting the error message. > *** The installed version of Perl, > /c/EnterpriseDB/LanguagePack/9.5/x64/Perl-5.20/bin, is too old to use with > PostgreSQL. > *** Perl version 5.8 or later is required, but this is . > configure: WARNING: > *** Without Perl you will no

[GENERAL] How to build custom rpm package for postgres 9.4.4

2016-10-20 Thread Timofei Dynikov
Hi! I have postgres of old version 9.4.4. It was installed from RHEL repository. But now I need to patch sources for fixing one bug and make build as native rpm. I tried to find src.rpm for my version, but oldest srpm for 9.4 is 9.4.8. What is the best way to build own rmp in this situation? I k

[GENERAL] make PostgreSQL with TCLSH: No rule to make target

2016-10-20 Thread Andre Mikulec
Hi, I am trying to configure PostgreSQL with the pltcl language available. Here is my ./configure line Targetuser@TARGETMACH /c/postgres-master_0ab9c56_debug $ ./configure TCLSH=/c/EnterpriseDB/LanguagePack/9.5/x64/Tcl-8.5/bin --with-tcl --with-tclconfig=/c/EnterpriseDB/LanguagePack/9.5/x64/Tcl

[GENERAL] Postgres upgrade from 9.4.9 to 9.6 using pg_upgrade error

2016-10-20 Thread Ashish Chauhan
Hi, I am planning to upgrade our current Postgres 9.4.9 to 9.6 version using pg_upgrade method to reduce Production downtime. I followed below steps so far, * Postgres 9.4.9 running on 5432 port. * Same server, installed Postgres 9.6, its running fine on 5433 port. * S

[GENERAL] configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .

2016-10-20 Thread Andre Mikulec
Hi, I am trying to configure PostgreSQL with the plperl language available. Here is my ./configure line TargetUser@TARGETMACH /c/postgres-master_0ab9c56_debug $ ./configure PERL=/c/EnterpriseDB/LanguagePack/9.5/x64/Perl-5.20/bin --with-perl --with-includes=/c/EnterpriseDB/Langu agePack/9.5/x64

[GENERAL] Postgresql apt repository naming scheme question

2016-10-20 Thread Jacob Scott
Hi, Many packages in the Postgres apt repository ( https://wiki.postgresql.org/wiki/Apt) are named with a PG major version postfix such as postgresql-client-9.5. Is there a reason why libpq-dev is not? Specifically, I'm interested installing Postgres 9.5 on Ubuntu 14.04, which is made very easy t

[GENERAL] pg_upgrade_server.log file location

2016-10-20 Thread Ashish Chauhan
Hi, I am upgrading Postgres 9.4 to 9.6 on Ubuntu 16.04. I am getting below error while running pg_upgrade command. Does anyone know "pg_upgrade_server.log" file location? I am not able to find log file. Command :# sudo -H -u postgres /usr/lib/postgresql/9.6/bin/pg_upgrade -b /usr/lib/postgresq

[GENERAL] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Andre Mikulec
Hi, I am trying to configure PostgreSQL with the plpython language available. Here is my ./configure line TargetUser@TARGETMACH /c/postgres-master_0ab9c56_debug $ ./configure PYTHON=/c/EnterpriseDB/LanguagePack/9.5/x64/Python-3.3 --with-python --with-includes=/c/EnterpriseDB/Lang uagePack/9.5/

Re: [GENERAL] out-of-order XID insertion in KnownAssignedXids

2016-10-20 Thread Michael Paquier
On Thu, Oct 20, 2016 at 10:21 PM, wrote: > Version : 9.2.13 You are largely out of date here. The last minor version available in the 9.2 series is 9.2.18, meaning that you are missing more than one year worth of bug fixes. > - remove a file called backup_label, but I am not certain that th

Re: [GENERAL] out-of-order XID insertion in KnownAssignedXids

2016-10-20 Thread fredrik
Hi Andres, thank you very much for your response. Full details on our postgresql version is: Name : postgresql-server Arch : x86_64 Version : 9.2.13 Release : 1.el7_1 Size : 3.8 M Repo : rhel-7-server-dvd-rpms Summary : The programs needed to create and run a PostgreSQL server URL :

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Francisco Olarte
On Thu, Oct 20, 2016 at 1:51 PM, Bjørn T Johansen wrote: > I have the following SQL: > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 > 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10.2016 > 23:59:59','DD.MM. > HH24:MI:SS') > date is of type timestamp. > I was exp

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Francisco Olarte
Bottom quoting makes it difficult to reply properly, so reformated a bit: On Thu, Oct 20, 2016 at 2:02 PM, William Ivanski wrote: > Em qui, 20 de out de 2016 às 09:52, Bjørn T Johansen > escreveu: >> date is of type timestamp. > select * from table where date = '2016/10/20'::date I think is the

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread vinny
On 2016-10-20 14:27, Bjørn T Johansen wrote: On Thu, 20 Oct 2016 14:04:51 +0200 vinny wrote: On 2016-10-20 13:51, Bjørn T Johansen wrote: > I have the following SQL: > > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 > 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread rob stone
ops as date separators. Anyway, this will work:- SELECT * from table WHERE TO_CHAR(date,'MMDD') = '20161020'; HTH, Rob  -- 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] Strange? BETWEEN behaviour.

2016-10-20 Thread Bjørn T Johansen
On Thu, 20 Oct 2016 14:04:51 +0200 vinny wrote: > On 2016-10-20 13:51, Bjørn T Johansen wrote: > > I have the following SQL: > > > > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 > > 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10.2016 > > 23:59:59','DD.MM. > > H

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Bjørn T Johansen
Yes, that's what I am doing now but I was just wondering why the other way did not work... BTJ On Thu, 20 Oct 2016 12:02:14 + William Ivanski wrote: > You could try: > > select * from table where date = '2016/10/20'::date > > Em qui, 20 de out de 2016 às 09:52, Bjørn T Johansen > escrev

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread vinny
On 2016-10-20 13:51, Bjørn T Johansen wrote: I have the following SQL: SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10.2016 23:59:59','DD.MM. HH24:MI:SS') date is of type timestamp. I was expecting to get all the re

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread William Ivanski
You could try: select * from table where date = '2016/10/20'::date Em qui, 20 de out de 2016 às 09:52, Bjørn T Johansen escreveu: > I have the following SQL: > > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 > 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10.2016 > 2

[GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Bjørn T Johansen
I have the following SQL: SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 00:00:00','DD.MM. HH24:MI:SS') AND to_timestamp('20.10.2016 23:59:59','DD.MM. HH24:MI:SS') date is of type timestamp. I was expecting to get all the records that had datepart = 20.10.2016 but I am

Re: [GENERAL] Unnest an array in postgresql

2016-10-20 Thread Jaisingkar, Piyush
Hello, I am trying to run following query in a function: CREATE TEMP TABLE temptable on commit drop as (Select * from unnest(string_to_array(temp1,',')) as (rep_id int,install_uprn varchar,address text,postcode varchar)); Where temp1 is an string and looks like this: {"(20812,,BND11TN-H1,P

[GENERAL] Unnest an array in postgresql

2016-10-20 Thread Jaisingkar, Piyush
Hello, I am trying to run following query in a function: CREATE TEMP TABLE temptable on commit drop as (Select * from unnest(string_to_array(temp1,',')) as (rep_id int,install_uprn varchar,address text,postcode varchar)); Where temp1 is an array and looks like this: {"(20812,,BND11TN-H1,PL

Re: [GENERAL] Sequences / Replication

2016-10-20 Thread Jonathan Eastgate
And further to my last post - another post in the forums related to this: https://devon.so/2015/02/06/as-tale-of-sequences-and-postgresql-replication-9/ Thanks. *Jonathan J. Eastgate* Chief Technology Officer | simPRO Software Group Ph: 1300 139 467+61 7 3147 8777

[GENERAL] Sequences / Replication

2016-10-20 Thread Jonathan Eastgate
Hi everyone. We're seeing some odd behaviour from a PostgreSQL group - one running as primary and the other as a hot slave using streaming replication. When a failover event occurs and we switch to the hot slave as primary sequences in tables jump by 33 - so where the last number allocated in the