Re: [GENERAL] Upsert with a partial unique index constraint violation

2016-07-11 Thread Peter Geoghegan
On Mon, Jul 11, 2016 at 12:06 AM, Tim Dawborn wrote: > tmp=# INSERT INTO foo (a, b, c, d) VALUES (1, 2, 'four', true) > tmp-# ON CONFLICT (a, b) WHERE d = true > tmp-# DO UPDATE SET c = 'four' WHERE foo.a = 1 AND foo.b = 2 AND foo.d = > true; > ERROR: there is no unique or exclusion constraint ma

[GENERAL] Upsert with a partial unique index constraint violation

2016-07-11 Thread Tim Dawborn
Hi all, I'm struggling to work out the correct way to use a partial unique index in an upsert context. Here's the context: I'm creating a partial unique index on a table: tmp=# CREATE TABLE foo (a INT NOT NULL, b int NOT NULL, c TEXT, d BOOLEAN DEFAULT false); CREATE TABLE tmp=# CREATE UNIQUE IN

Re: [GENERAL] error when upgrading 9.4 to 9.5 manually

2016-07-11 Thread Adrian Klaver
On 07/11/2016 01:00 AM, arnaud gaboury wrote: On Sun, Jul 10, 2016 at 7:07 PM, Adrian Klaver wrote: On 07/10/2016 03:13 AM, arnaud gaboury wrote: My box upgraded postgresql from 9.4.8 to 9.5.3 when doing a full version upgrade (Fedora 23 --> 24). I have now : /db/pgsal/data > initialize

Re: [GENERAL] Broken after upgrade

2016-07-11 Thread Kris Deugau
Adrian Klaver wrote: > There is still the issue of the 9.4 binaries and which version of > Postgres you are running commands from at any given time. I would > suggest using full paths to the commands until this is resolved. It reads to me as if the OP's Fedora 23 -> Fedora 24 upgrade didn't instal

Re: [GENERAL] 9.6 beta2 win-x64 download links still point to beta1

2016-07-11 Thread Bruce Momjian
On Fri, Jul 1, 2016 at 05:39:28PM -0400, Bruce Momjian wrote: > > Replacing beta1 with beta2 leads to a 404 (for both direct download links) > > Yes, I confirmed in a later email that it is still broken. > > It was also reported by someone else today: > > > https://www.postgresql.org/mes

Re: [GENERAL] How to insert/update a bunch of JSOB values?

2016-07-11 Thread David G. Johnston
On Mon, Jul 11, 2016 at 8:45 AM, Deven Phillips wrote: > We need to update a JSONB data structure in our tables to include an > 'is_valid' flag. I was able to build a CTE which I use to create a temp > table containing the 'is_valid' value, the path where it needs to be set, > and the join criter

[GENERAL] How to insert/update a bunch of JSOB values?

2016-07-11 Thread Deven Phillips
We need to update a JSONB data structure in our tables to include an 'is_valid' flag. I was able to build a CTE which I use to create a temp table containing the 'is_valid' value, the path where it needs to be set, and the join criteria. Let's say that the temp table looks like: id TEXT, > time_in

Re: [GENERAL] Running query without trigger?

2016-07-11 Thread hamann . w
>> On 2016-07-09 08:20, haman...@t-online.de wrote: >> > Hi, >> > >> > a table is associated with a trigger for normal use. >> > An admin (someone with ALTER privilege) can disable tthe trigger, run some >> > bulk update, >> > and then re-enable it. This means, however, that normal user activity

Re: [GENERAL] Running query without trigger?

2016-07-11 Thread hamann . w
>> On 2016-07-09 08:20, haman...@t-online.de wrote: >> > Hi, >> > >> > a table is associated with a trigger for normal use. >> > An admin (someone with ALTER privilege) can disable tthe trigger, run some >> > bulk update, >> > and then re-enable it. This means, however, that normal user activity

Re: [GENERAL] [BUGS] Where clause in pg_dump: need help

2016-07-11 Thread Francisco Olarte
Hi Adi: ( Is this correct? Adi is what your message uses to mark your replies ). On Sun, Jul 10, 2016 at 6:53 PM, Prashanth Adiyodi wrote: > Hi Franciso, My comments below inline Got them. Only problem is your MUA does not signal quotes. It looks like some kind of outlook by the headers it sends

Re: [GENERAL] Memory usage per session

2016-07-11 Thread AMatveev
Hi > On Jul 08, John McKown modulated: > ... >> I think the "problem" that he is having is fixable only by changing how >> PostgreSQL itself works. His problem is a PL/pgSQL function which is >> 11K lines in length. When invoked, this function is "compiled" into a >> large tokenized parse tree. Th

Re: [GENERAL] error when upgrading 9.4 to 9.5 manually

2016-07-11 Thread arnaud gaboury
On Sun, Jul 10, 2016 at 7:07 PM, Adrian Klaver wrote: > On 07/10/2016 03:13 AM, arnaud gaboury wrote: >> >> My box upgraded postgresql from 9.4.8 to 9.5.3 when doing a full >> version upgrade (Fedora 23 --> 24). >> >> I have now : >> >> /db/pgsal/data > initialized with 9.5, with postgresql.co