Re: Using pg Admin to create backups and restore them

2018-07-03 Thread Łukasz Jarych
Thank you Adrian , Best, Jacek wt., 3 lip 2018 o 15:23 Adrian Klaver napisał(a): > On 07/03/2018 04:44 AM, Łukasz Jarych wrote: > > Hi Guys, > > > > it is possible to use pgadmin 4 to run pgdump from query tool? > > pg_dump is a client program in pgAdmin4 you can run it from here: > > https://

Re: problem wirh irc ffreenode

2018-07-03 Thread Łukasz Jarych
Hi, thank you, working now. wt., 3 lip 2018 o 15:27 Adrian Klaver napisał(a): > On 07/03/2018 05:13 AM, Łukasz Jarych wrote: > > Hi, > > > > i tried today to log into psotgresql channel on inc but i can not: > > > > [14:12]Copyright (C) 2008-2014 Chris Porter and the qwebirc project. > >

Re: pg_dump out of memory

2018-07-03 Thread David Rowley
On 4 July 2018 at 14:43, Andy Colson wrote: > I moved a physical box to a VM, and set its memory to 1Gig. Everything > runs fine except one backup: > > > /pub/backup# pg_dump -Fc -U postgres -f wildfire.backup wildfirep > > g_dump: Dumping the contents of table "ofrrds" failed: PQgetResult() fail

Re: pg_dump out of memory

2018-07-03 Thread George Neuner
On Tue, 3 Jul 2018 21:43:38 -0500, Andy Colson wrote: >Hi All, > >I moved a physical box to a VM, and set its memory to 1Gig. Everything >runs fine except one backup: > > >/pub/backup# pg_dump -Fc -U postgres -f wildfire.backup wildfirep > >g_dump: Dumping the contents of table "ofrrds" failed:

Re: pg_dump out of memory

2018-07-03 Thread Adrian Klaver
On 07/03/2018 08:28 PM, Andy Colson wrote: On 07/03/2018 10:21 PM, Adrian Klaver wrote: On 07/03/2018 07:43 PM, Andy Colson wrote: Hi All, I moved a physical box to a VM, and set its memory to 1Gig.  Everything runs fine except one backup: /pub/backup# pg_dump -Fc -U postgres -f wildfire.bac

Re: pg_dump out of memory

2018-07-03 Thread Andy Colson
On 07/03/2018 10:21 PM, Adrian Klaver wrote: On 07/03/2018 07:43 PM, Andy Colson wrote: Hi All, I moved a physical box to a VM, and set its memory to 1Gig.  Everything runs fine except one backup: /pub/backup# pg_dump -Fc -U postgres -f wildfire.backup wildfirep g_dump: Dumping the contents

Re: pg_dump out of memory

2018-07-03 Thread Adrian Klaver
On 07/03/2018 07:43 PM, Andy Colson wrote: Hi All, I moved a physical box to a VM, and set its memory to 1Gig.  Everything runs fine except one backup: /pub/backup# pg_dump -Fc -U postgres -f wildfire.backup wildfirep g_dump: Dumping the contents of table "ofrrds" failed: PQgetResult() faile

pg_dump out of memory

2018-07-03 Thread Andy Colson
Hi All, I moved a physical box to a VM, and set its memory to 1Gig. Everything runs fine except one backup: /pub/backup# pg_dump -Fc -U postgres -f wildfire.backup wildfirep g_dump: Dumping the contents of table "ofrrds" failed: PQgetResult() failed. pg_dump: Error message from server: ERROR:

Re: How to watch for schema changes

2018-07-03 Thread Melvin Davidson
>I'm writing a client in C++ with libpq. So I will have to do a lot of polling . Can't you just run a cron job? -- *Melvin Davidson* *Maj. Database & Exploration Specialist* *Universe Exploration Command – UXC* Employment by invitation only!

Re: How to watch for schema changes

2018-07-03 Thread Igor Korot
Hi Melvin On Tue, Jul 3, 2018, 2:00 PM Melvin Davidson wrote: > > > >Unfortunately I'm stuck with 9.1. > > Have you thought about just setting *log_statement = 'ddl'* in > postgresql.conf > and just greping the log for CREATE and ALTER? > That going to be not that simple. I'm writing a clie

Re: FK v.s unique indexes

2018-07-03 Thread David G. Johnston
On Tuesday, July 3, 2018, Rafal Pietrak wrote: > > ERROR: there is no unique constraint matching given keys for referenced > table "test2" > > > I cannot see any reasons why this functionality is blocked. > > In particular, contrary to what the ERROR says, the target

Re: FK v.s unique indexes

2018-07-03 Thread Tim Cross
Rafal Pietrak writes: > > In particular, contrary to what the ERROR says, the target table *does > have* a "unique constraint matching given keys", admittedly only > partial. Yet, why should that matter at all? A unique index, partial or > not, always yield a single row, and that's all what mat

Re: When exactly is a TIMESTAMPTZ converted to the sessions time zone?

2018-07-03 Thread Tom Lane
Thomas Kellerer writes: > A recent discussion around timestamptz behaviour has lead me to question my > own understanding on how a TIMESTAMPTZ is converted to the session's time > zone. > I assumed this conversion happens *on the server* before the value is sent to > the client. It's done in t

When exactly is a TIMESTAMPTZ converted to the sessions time zone?

2018-07-03 Thread Thomas Kellerer
A recent discussion around timestamptz behaviour has lead me to question my own understanding on how a TIMESTAMPTZ is converted to the session's time zone. I assumed this conversion happens *on the server* before the value is sent to the client. A co-worker of mine claims that this is purely a

Re: How to watch for schema changes

2018-07-03 Thread Melvin Davidson
>Unfortunately I'm stuck with 9.1. Have you thought about just setting *log_statement = 'ddl'* in postgresql.conf and just greping the log for CREATE and ALTER?

Re: How to watch for schema changes

2018-07-03 Thread Adrian Klaver
On 07/03/2018 11:41 AM, Igor Korot wrote: Adrian, On Tue, Jul 3, 2018 at 1:24 PM, Adrian Klaver wrote: On 07/03/2018 11:15 AM, Igor Korot wrote: Are you forced to work with 9.1 or can you use something from here: https://www.postgresql.org/download/macosx/ to get a newer version? FYI tha

Re: How to watch for schema changes

2018-07-03 Thread David G. Johnston
On Tue, Jul 3, 2018 at 11:41 AM, Igor Korot wrote: > ​​ > > I presume threre is a query which check for the function/trigger > existence? Something like: > > IF NOT EXIST(SELECT * FROM ) CREATE OR REPLACE FUNCTION; > ​CREATE OR REPLACE is how you re-create a function that (whose name/signatu

Re: How to watch for schema changes

2018-07-03 Thread Igor Korot
Adrian, On Tue, Jul 3, 2018 at 1:24 PM, Adrian Klaver wrote: > On 07/03/2018 11:15 AM, Igor Korot wrote: >> >> Adrian, >> >> On Tue, Jul 3, 2018 at 12:32 PM, Adrian Klaver >> wrote: >>> >>> On 07/03/2018 10:21 AM, Igor Korot wrote: Hi, ALL, Is there any trigger or some other

Re: How to watch for schema changes

2018-07-03 Thread David G. Johnston
On Tue, Jul 3, 2018 at 10:21 AM, Igor Korot wrote: > Hi, ALL, > Is there any trigger or some other means I can do on the server > which will watch for CREATE/ALTER/DROP TABLE command and after successful > execution of those will issue a NOTIFY statement? > ​You just asked this question two week

Re: How to watch for schema changes

2018-07-03 Thread Adrian Klaver
On 07/03/2018 11:15 AM, Igor Korot wrote: Adrian, On Tue, Jul 3, 2018 at 12:32 PM, Adrian Klaver wrote: On 07/03/2018 10:21 AM, Igor Korot wrote: Hi, ALL, Is there any trigger or some other means I can do on the server which will watch for CREATE/ALTER/DROP TABLE command and after successful

Re: How to watch for schema changes

2018-07-03 Thread Igor Korot
Adrian, On Tue, Jul 3, 2018 at 12:32 PM, Adrian Klaver wrote: > On 07/03/2018 10:21 AM, Igor Korot wrote: >> >> Hi, ALL, >> Is there any trigger or some other means I can do on the server >> which will watch for CREATE/ALTER/DROP TABLE command and after successful >> execution of those will issue

Re: How to watch for schema changes

2018-07-03 Thread Adrian Klaver
On 07/03/2018 10:21 AM, Igor Korot wrote: Hi, ALL, Is there any trigger or some other means I can do on the server which will watch for CREATE/ALTER/DROP TABLE command and after successful execution of those will issue a NOTIFY statement? https://www.postgresql.org/docs/10/static/event-triggers

How to watch for schema changes

2018-07-03 Thread Igor Korot
Hi, ALL, Is there any trigger or some other means I can do on the server which will watch for CREATE/ALTER/DROP TABLE command and after successful execution of those will issue a NOTIFY statement? Thank you.

Re: Analyze plan of foreign data wrapper

2018-07-03 Thread Mathieu PUJOL
I read it many times but I'am not entirely familiar with concepts of range table and I'am not sure to fully understant all implications. For now I have a workaround by parsing only plan's target list and by checking if resorigtbl is equal to oid of my table. The main drawback is that I can't detect

Re: Question on the right way to think about order by

2018-07-03 Thread David G. Johnston
On Tuesday, July 3, 2018, Paula Kirsch wrote: > > When I think about order by in an aggregate statement, e.g. > > select string_agg(product, ' | ' order by product) from products; > > > is it correct to think of order by as a parameter passed to string_agg? > For a user it's simply the order that

Question on the right way to think about order by

2018-07-03 Thread Paula Kirsch
When I think about using order by in a select statement, e.g. select id, name, price from stuff order by name; I think of order by as an operator sorting data returned by the select statement. When I think about order by in an aggregate statement, e.g. select string_agg(product, ' | ' order by

Re: Cloning schemas

2018-07-03 Thread Melvin Davidson
> ERROR: BŁĄD: you cannot add to column "TopoToVersion_ID" DETAIL: Column > "TopoToVersion_ID" is an identity column defined as GENERATED ALWAYS. HINT: > Use OVERRIDING SYSTEM VALUE to override. CONTEXT: wyrażenie SQL "INSERT > INTO version4.t_topotoversions SELECT * FROM public.t_topotoversions;"

Re: problem wirh irc ffreenode

2018-07-03 Thread Adrian Klaver
On 07/03/2018 05:13 AM, Łukasz Jarych wrote: Hi, i tried today to log into psotgresql channel on inc but i can not: [14:12]Copyright (C) 2008-2014 Chris Porter and the qwebirc project. [14:12]http://www.qwebirc.org [14:12]Licensed under the GNU General P

Re: Using pg Admin to create backups and restore them

2018-07-03 Thread Adrian Klaver
On 07/03/2018 04:44 AM, Łukasz Jarych wrote: Hi Guys, it is possible to use pgadmin 4 to run pgdump from query tool? pg_dump is a client program in pgAdmin4 you can run it from here: https://www.pgadmin.org/docs/pgadmin4/3.x/backup_and_restore.html It is very imporant to me because i am ru

Re: except all & WITH - syntax error?

2018-07-03 Thread Adrian Klaver
On 07/03/2018 02:05 AM, pinker wrote: thank you for the answer, had no idea about "syntactic precedence" thing. The order in which commands are executed in the absence of specific instructions e.g. the use of parenthesis. -- Adrian Klaver adrian.kla...@aklaver.com

problem wirh irc ffreenode

2018-07-03 Thread Łukasz Jarych
Hi, i tried today to log into psotgresql channel on inc but i can not: [14:12] Copyright (C) 2008-2014 Chris Porter and the qwebirc project. > [14:12] http://www.qwebirc.org > [14:12] Licensed under the GNU General Public License, Version 2. > [14:12] == Connecting to server, please wait... > [14

Using pg Admin to create backups and restore them

2018-07-03 Thread Łukasz Jarych
Hi Guys, it is possible to use pgadmin 4 to run pgdump from query tool? It is very imporant to me because i am running queries from Access FE using ODBC connection. Please help, Jacek

Re: Analyze plan of foreign data wrapper

2018-07-03 Thread Laurenz Albe
Mathieu PUJOL wrote: > I understand that I should also use varno to check which table is referenced > by varattno. In case of Join, aggregation, etc. Sometimes I get a number or > INNER_VAR or OUTER_VAR. > I am lost on how i could resolve this. > I understand that OUTER_VAR/INNER_VAR are related

One transaction and several processes

2018-07-03 Thread Valery Kuzmin
Hi, Can multiple processes participate in a single transaction's execution? I need to do the following actions sequence: 1. Calling service begins transaction. At this step transaction manager generate new XID. 2. Calling service updates some data. 3. Need to detach a transaction from a service co

Re: Trouble matching a nested value in JSONB entries

2018-07-03 Thread Enrico Thierbach
Oleg, 1 | {"group_id": 1} 2 | {“group_id": 1} 3 | {“group_id": 2} 4 | {“group_id": 3} PS: Please note that I am currently at postgres 9.5. An update, if necessary, would be possible though. Upgrade, please ! I have only master 11beta2 right now: select * from qq where js @> '{"group_id"

Re: Windows 10 got stuck with PostgreSQL at starting up. Adding delay lets it avoid.

2018-07-03 Thread TAKATSUKA Haruka
> On Fri, 29 Jun 2018 08:34:18 +0200 > Thomas Kellerer wrote: > > > Did you try setting the service to "delayed start"? > > We didn't try it yet. Thanks to give an idea. I think that > MS would advise us already if it were a just solution for this case. > Anyway, we will try and confirm it. We

Re: FK v.s unique indexes

2018-07-03 Thread David Rowley
On 3 July 2018 at 19:30, Rafal Pietrak wrote: > tst=# create table test1(load bigint, a int, b int, c bool) partition by > list (c); > CREATE TABLE > tst=# create table test1_true partition of test1 for values in (true); > CREATE TABLE > tst=# create table test1_false partition of test1 for valu

Re: except all & WITH - syntax error?

2018-07-03 Thread pinker
thank you for the answer, had no idea about "syntactic precedence" thing. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Trouble matching a nested value in JSONB entries

2018-07-03 Thread Oleg Bartunov
On Wed, Jun 20, 2018 at 10:06 PM, Enrico Thierbach wrote: > Hi list, > > I have some trouble matching a value in a JSONB object against multiple > potential matches. > > Lets say, I have a table with an id, and a metadata JSONB column, which > holds data like the following > > 1 | {"group_id": 1}

Re: Cloning schemas

2018-07-03 Thread Łukasz Jarych
Hi Melvin, I understand this but i can not update function by myself. Thnak you very much ! Still errors here. Something like: ERROR: BŁĄD: you cannot add to column "TopoToVersion_ID" DETAIL: Column "TopoToVersion_ID" is an identity column defined as GENERATED ALWAYS. HINT: Use OVERRIDING SYSTE

FK v.s unique indexes

2018-07-03 Thread Rafal Pietrak
Hi, For some time now, I'm withholding new features in my DB application as I wasn't able to have unique constraints on partitioned tables. PG-v11 now has it and I've given it a try, but to my surprise it does not give it fully to the application. Those indexes don't support FK! At this point I've