Re: convert real to numeric.

2018-10-18 Thread Tom Lane
"Peter J. Holzer" writes: > On 2018-10-18 10:15:40 -0400, Tom Lane wrote: >> You could ju-jitsu the system into duplicating that behavior by casting >> to text (which invokes float4out) and then to numeric: > I suggest casting first to float8 and then to numeric. The conversion > from float4 to

Re: PGDG status and policy

2018-10-18 Thread Steve Crawford
No, the *link* exists. The package doesn't (404 errors on, for example, Centos 7 x86_64 and several others). Cheers, Steve On Thu, Oct 18, 2018 at 3:22 PM Adrian Klaver wrote: > On 10/18/18 3:02 PM, Steve Crawford wrote: > > While looking to install version 11 I discovered that the PGDG Yum >

Re: PGDG status and policy

2018-10-18 Thread Adrian Klaver
On 10/18/18 3:02 PM, Steve Crawford wrote: While looking to install version 11 I discovered that the PGDG Yum repository page at https://www.postgresql.org/download/linux/redhat/ includes repository RPMs for RHEL7  (x86_64 and ppc64Ie), and RHEL6 (x86_64 and i386). However there are no RPMs

PGDG status and policy

2018-10-18 Thread Steve Crawford
While looking to install version 11 I discovered that the PGDG Yum repository page at https://www.postgresql.org/download/linux/redhat/ includes repository RPMs for RHEL7 (x86_64 and ppc64Ie), and RHEL6 (x86_64 and i386). However there are no RPMs for version 6 of any derivatives (CentOS,

Re: convert real to numeric.

2018-10-18 Thread Peter J. Holzer
On 2018-10-18 10:15:40 -0400, Tom Lane wrote: > Alessandro Aste writes: > > I need to convert an SQL field from real to numeric, but I’m getting a > > strange behavior. > > select amount, amount::numeric, amount::numeric(16,4), > > amount::varchar::numeric from mytable where id = 32560545; > >

query replication status when WAL-E is used

2018-10-18 Thread Valery Sizov
Hi all, I need to have a way to query a streaming replication status from the client (Web app), on a secondary node. It can be easily done now by performing a query "select pid, status from pg_stat_wal_receiver". The problem is that sometimes we need to use WAL-E replication and in this case,

Re: BUG: Incorrect working with POSIX locale if database in UTF-8 encoding

2018-10-18 Thread Tom Lane
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= writes: > [ postmaster's localized messages are printed as garbage if LANG is C or > unset ] I'm not quite convinced that this is a bug. The reason it's misbehaving is that in the postmaster process (and, probably, non-backend children)

Re: convert real to numeric.

2018-10-18 Thread Tom Lane
Alessandro Aste writes: > I need to convert an SQL field from real to numeric, but I’m getting a > strange behavior. > select amount, amount::numeric, amount::numeric(16,4), > amount::varchar::numeric from mytable where id = 32560545; > Result: > 17637.75, 17637.8, 17637.8000, 17637.75 You

Re: Pgbouncer discard all

2018-10-18 Thread Fabio Pardi
@Nicola, while I'm glad you got further help.. I was asking myself it you maybe missed my answer to your question? (mail from 10/10/2018 at 15:31) https://www.postgresql.org/message-id/a22f8385-2a49-30a7-b1d2-fc743c2f3245%40portavita.eu regards, fabio pardi On 16/10/2018 14:12, Nicola Contu

Help with list partitioning on expression

2018-10-18 Thread Dinko Papak
I have created table partitioned by list on expression using timestamp column, so for each timestamp value function returns int and each partition table is for single value (range of timestamp for which function result is the same). This helps me to simplify querying as I do not need to always

Re: BUG: Incorrect working with POSIX locale if database in UTF-8 encoding

2018-10-18 Thread Jehan-Guillaume (ioguix) de Rorthais
On Wed, 17 Oct 2018 12:29:52 +0300 Олег Самойлов wrote: > There is not problem with systemctl, if system locale setted by localectl is > the same as database locale. But, as I said, there is problem with pacemaker > pgsqlms module. And I think this is incorrect behavior. Database may write in >

Re: convert real to numeric.

2018-10-18 Thread Adrian Klaver
On 10/18/18 3:28 AM, Alessandro Aste wrote: Hi, Postresql version: 10.5 I need to convert an SQL field from real to numeric, but I’m getting a strange behavior. See the following query in preprod: select amount, amount::numeric, amount::numeric(16,4), amount::varchar::numeric from

Re: pg_dump backup utility is taking more time around 24hrs to take the backup of 28GB

2018-10-18 Thread Ozz Nixon
There are many possible problems, could you share your command line? For example. Dump on SAME drive as the DB files, can produce disk contention. Dump across the network, can have packet collision of network latency. I dump 20gb test server in a matter of a couple minutes here. But, I run

pg_dump backup utility is taking more time around 24hrs to take the backup of 28GB

2018-10-18 Thread Raghavendra Rao J S V
Hi All, We are using *pg_dump *backup utility in order to take the backup of the database. Unfortunately,it is taking around 24hrs of time to take the backup of 28GB database. Please guide me how to reduce the time and is there any parameter need to be modified which will help us to reduce the

convert real to numeric.

2018-10-18 Thread Alessandro Aste
Hi, Postresql version: 10.5 I need to convert an SQL field from real to numeric, but I’m getting a strange behavior. See the following query in preprod: select amount, amount::numeric, amount::numeric(16,4), amount::varchar::numeric from mytable where id = 32560545; Result:

Re: postgres server process crashes when using odbc_fdw

2018-10-18 Thread Laurenz Albe
Ravi Krishna wrote: > On a related note is fdw for Oracle and SQLServer supported by the community ? The PostgreSQL Global Development Group, specifically these mailing lists, will provide support for "core PostgreSQL", that is the source code you can download from www.postgresql.org and binaries