Re: [GENERAL] Do not INSERT if UPDATE fails

2017-08-03 Thread Francisco Olarte
On Wed, Aug 2, 2017 at 6:23 PM, Scott Marlowe wrote: > Does insert's "on conflict" clause not work for this usage? Did you even bother to read the queries? He is using two different tables. Francisco Olarte. -- Sent via pgsql-general mailing list

[GENERAL] standby database crash

2017-08-03 Thread Murtuza Zabuawala
++ Forwarding to pgsql-general group. -- Forwarded message -- From: Seong Son (US) Date: Thu, Aug 3, 2017 at 12:48 AM Subject: standby database crash To: "pgadmin-supp...@lists.postgresql.org" < pgadmin-supp...@lists.postgresql.org> Hello, I’ve posted

Re: [GENERAL] Would you add a --dry-run to pg_restore?

2017-08-03 Thread Francisco Olarte
On Wed, Aug 2, 2017 at 7:10 PM, Edmundo Robles wrote: > > I imagine pg_restore can execute the instructions on dump but don't > write on disk. just like David said: "tell me what is going to happen but > don't actually do it" IIRC pg_restore does not execute SQL

Re: [GENERAL] Would you add a --dry-run to pg_restore?

2017-08-03 Thread Rory Campbell-Lange
On 02/08/17, Steve Atkins (st...@blighty.com) wrote: > > On Aug 2, 2017, at 9:02 AM, Edmundo Robles wrote: > > > > I mean, to verify the integrity of backup i do: > > > > gunzip -c backup_yesterday.gz | pg_restore -d my_database && echo > > "backup_yesterday is OK" >

Re: [GENERAL] Check if prepared statement exist?

2017-08-03 Thread Tom Lane
Igor Korot writes: > Is there a way to do such a check from the libpq? I think the pg_prepared_statements view will help you. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] Check if prepared statement exist?

2017-08-03 Thread Igor Korot
Hi, ALL, Is there a way to do such a check from the libpq? I'm trying to call a function from 2 different places of the application and want to see if I already had the call to PQprepare(); Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] unexpected pageaddr

2017-08-03 Thread armand pirvu
Well this reproduces with pg_basebackup Disturbing. I wonder what else if lurking around > On Aug 2, 2017, at 10:34 PM, armand pirvu wrote: > > Hi > > Setting up the hot_standby the only way I could it get the base remote > cluster running was including pg_xlog >

Re: [GENERAL] select md5 result set

2017-08-03 Thread Jeff Janes
On Wed, Aug 2, 2017 at 4:25 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Aug 2, 2017 at 3:42 PM, Peter Koukoulis > wrote: > >> >> SQL> select dbms_sqlhash.gethash('select x,y from test1',2) as md5_value >> from dual; >> >> MD5_VALUE >>

Re: [GENERAL] hot standby questions

2017-08-03 Thread Jeff Janes
On Wed, Aug 2, 2017 at 8:19 PM, armand pirvu wrote: > > Hi > > Just trying to put together the hot_standby setup > All docs I read are pointing to use as prefered method to use > pg_basebackup to set the base > So far so good > But > > psql postgres -c "select

[GENERAL] cast issue in WITH RECURION

2017-08-03 Thread k b
Hi. i use postgresql 9.6.3. I have made a small graph with nodes and edges. Each edge has a distance numeric (7,3) attribute. when i create a recursive query and try to add the distances i get a message: ERROR: recursive query "edges" column 3 has type numeric(7,3) in non-recursive term but

Re: [GENERAL] cast issue in WITH RECURION

2017-08-03 Thread k b
Den tors 2017-08-03 skrev k b : Ämne: cast issue in WITH RECURION Till: pgsql-general@postgresql.org Datum: torsdag 3 augusti 2017 20:22 Hi. i use postgresql 9.6.3. I have made a small graph with nodes and edges. Each edge

Re: [GENERAL] hot standby questions

2017-08-03 Thread Lucas Possamai
2017-08-04 5:58 GMT+12:00 Jeff Janes : > On Wed, Aug 2, 2017 at 8:19 PM, armand pirvu > wrote: > >> >> Hi >> >> Just trying to put together the hot_standby setup >> All docs I read are pointing to use as prefered method to use >> pg_basebackup to set

[GENERAL] Setting Variables within the PostgreSQL Service Process on AWS Linux

2017-08-03 Thread Mark Street
Hi All, I was hoping someone could point me in the right direction. I want to use Python 3.4 with AWS Linux and PostgreSQL 9.4. By default AWS Linux OS users Python2.7. I am trying to set the following variable in the PostgreSQL startup service PYTHONPATH=/usr/lib64/python3.4 Below

Re: [GENERAL] cast issue in WITH RECURION

2017-08-03 Thread Alban Hertroys
> On 3 Aug 2017, at 20:22, k b wrote: > > when i create a recursive query and try to add the distances i get a message: > ERROR: recursive query "edges" column 3 has type numeric(7,3) in > non-recursive term but type numeric overall. > My exercise is almost identical to the

Re: [GENERAL] cast issue in WITH RECURION

2017-08-03 Thread k b
> when i create a recursive query and try to add the distances i get a message: > ERROR:  recursive query "edges" column 3 has type numeric(7,3) in non-recursive term but type numeric overall. > My exercise is almost identical to the example in the docs: > WITH RECURSIVE

Re: [GENERAL] Would you add a --dry-run to pg_restore?

2017-08-03 Thread Merlin Moncure
On Wed, Aug 2, 2017 at 11:49 AM, Tom Lane wrote: > Edmundo Robles writes: >> I mean, to verify the integrity of backup i do: >> gunzip -c backup_yesterday.gz | pg_restore -d my_database && echo >> "backup_yesterday is OK" > >> but my_database's