Re: [GENERAL] AEXPR_OR, AEXPR_AND is not in postgres 9.6, how can I rewrite where it used in 9.3 ?

2017-04-04 Thread Peter Eisentraut
On 4/4/17 23:28, lin wrote: > all. I use "AEXPR_OR", "AEXPR_AND" in postgres 9.3 ,now I update the > postgres version to 9.6, but the 9.6 version has not the "AEXPR_OR", > "AEXPR_AND". > How can I solve the problem ? See commit 2146f13408cdb85c738364fe8f7965209e08c6be about how the internal

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-04 Thread Tom Lane
Bruno Wolff III writes: > ... I create both a normal gist index and an exclude index using the > following: > CREATE INDEX contains ON iplocation USING gist (network inet_ops); > ALTER TABLE iplocation > ADD CONSTRAINT overlap EXCLUDE USING gist (network inet_ops WITH &&); >

[GENERAL] AEXPR_OR, AEXPR_AND is not in postgres 9.6, how can I rewrite where it used in 9.3 ?

2017-04-04 Thread lin
Hi, all. I use "AEXPR_OR", "AEXPR_AND" in postgres 9.3 ,now I update the postgres version to 9.6, but the 9.6 version has not the "AEXPR_OR", "AEXPR_AND". How can I solve the problem ? Thanks, wln

[GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-04 Thread Bruno Wolff III
I am trying to load a database with about 3.5 million records relating netblocks to locations. I currently don't know whether or not any of the netblocks overlap. If they don't, then I can simplify queries that find the locations of IP addresses. I create the table as follows: DROP TABLE IF

Re: [GENERAL] keeping WAL after dropping replication slots

2017-04-04 Thread Adrian Klaver
On 04/04/2017 07:45 AM, Tom DalPozzo wrote: Postgres version? Hi, I had two replication slots on my primary. Slaves off and (around 800) WALs kept as expected. Slaves off means?: You replication set up from the master to the slaves(how many?). Then you disconnected the slaves how? So the

Re: [GENERAL] getting column names

2017-04-04 Thread Armand Pirvu (home)
Thanks David Worked like a charm and results are correct Armand On Apr 4, 2017, at 5:00 PM, David G. Johnston wrote: > On Tue, Apr 4, 2017 at 2:51 PM, Armand Pirvu (home) > wrote: > > But if I join back to foo1 like below I get > >

Re: [GENERAL] Unexpected interval comparison

2017-04-04 Thread Tom Lane
Kyotaro HORIGUCHI writes: > The first attached is the revised patch and the second is > temporary sanity check code for non-128bit environment code. (but > works only on 128 bit environment) This seemed to me to be probably even less correct, so I extracted the

Re: [GENERAL] getting column names

2017-04-04 Thread David G. Johnston
On Tue, Apr 4, 2017 at 2:51 PM, Armand Pirvu (home) wrote: > > But if I join back to foo1 like below I get > > select a.audit_id, a.table_name, b[1],b[2] > from > foo1 a, > (select > array( > select > column_name::text from > information_schema.columns > where >

[GENERAL] getting column names

2017-04-04 Thread Armand Pirvu (home)
Hi Can somebody please tell me if the below is possible ? I may not see the forest from the trees Thanks Armand levregdb=# select * from foo1; audit_id | table_name --+ 6012 | foo2 6013 | foo2 6014 | foo2 select * from foo2; levregdb=# select *

Re: [GENERAL] store key name pattern search

2017-04-04 Thread home
Thank you Jeff Nice . I also looked at akeys/skeys My goal is to get the key by pattern matching and then passing it back like in col1->key Armand On Apr 4, 2017, at 12:42 PM, Jeff Janes wrote: > On Tue, Apr 4, 2017 at 8:41 AM, Armand Pirvu (home)

Re: [GENERAL] store key name pattern search

2017-04-04 Thread Jeff Janes
On Tue, Apr 4, 2017 at 8:41 AM, Armand Pirvu (home) wrote: > Hi > > I have the following case > > > select * from foo; > col1 > > - > "show_id"=>"1",

Re: [GENERAL] WAL being written during SELECT * query

2017-04-04 Thread Scott Marlowe
On Tue, Apr 4, 2017 at 9:46 AM, Tom DalPozzo wrote: > Hi, > I have a very big table (10GB). > I noticed that many WAL segments are being written when elaborating read > only transactions like this: > select * from dati256 where id >4300 limit 100; > I don't

Re: [GENERAL] WAL being written during SELECT * query

2017-04-04 Thread Raymond O'Donnell
On 04/04/17 16:46, Tom DalPozzo wrote: Hi, I have a very big table (10GB). I noticed that many WAL segments are being written when elaborating read only transactions like this: select * from dati256 where id >4300 limit 100; I don't understand why are there WAL writings during

Re: [GENERAL] store key name pattern search

2017-04-04 Thread Armand Pirvu (home)
Thank you — Armand On Apr 4, 2017, at 10:50 AM, Oleg Bartunov wrote: > > On Tue, Apr 4, 2017 at 11:41 AM, Armand Pirvu (home) > wrote: > Hi > > I have the following case > > > select * from foo; > col1

Re: [GENERAL] store key name pattern search

2017-04-04 Thread Oleg Bartunov
On Tue, Apr 4, 2017 at 11:41 AM, Armand Pirvu (home) wrote: > Hi > > I have the following case > > > select * from foo; > col1 > > - > "show_id"=>"1",

[GENERAL] WAL being written during SELECT * query

2017-04-04 Thread Tom DalPozzo
Hi, I have a very big table (10GB). I noticed that many WAL segments are being written when elaborating read only transactions like this: select * from dati256 where id >4300 limit 100; I don't understand why are there WAL writings during read only transactions. Regards Pupillo

[GENERAL] store key name pattern search

2017-04-04 Thread Armand Pirvu (home)
Hi I have the following case select * from foo; col1 - "show_id"=>"1", "group_id"=>"32", "group_name"=>"slb", "group_add_by"=>"557651"

Re: [GENERAL] audit function and old.column

2017-04-04 Thread Armand Pirvu (home)
Sorry for the delay This is the one I used https://wiki.postgresql.org/wiki/Audit_trigger And the cfg_global_audit Column | Type | Modifiers --+--+ audit_id | bigint

[GENERAL] keeping WAL after dropping replication slots

2017-04-04 Thread Tom DalPozzo
Hi, I had two replication slots on my primary. Slaves off and (around 800) WALs kept as expected. I dropped those slots but over time, the system kept on adding new WALs without reusing them or deleting them. Only after shutdown and restart the system deleted those WAL files. Is that ok? regards

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-04 Thread Merlin Moncure
On Tue, Apr 4, 2017 at 8:20 AM, Daniel Westermann wrote: > Hi, > > PostgreSQL 9.6.2 on CentOS 7.3 x64. > > This is my data set: > > drop table if exists users; > drop table if exists ids; > create table users ( user_id int >, username

Re: [GENERAL] browser interface to forums please?

2017-04-04 Thread Stephen Frost
Greetings, * Robin St.Clair (ro...@robinstclair.net) wrote: > Please do not encrypt what does not need to be encrypted. Signing > communications to a mailing list probably isn't required? Signing communications demonstrates that the message was, indeed, from me. You are certainly welcome to

Re: [GENERAL] browser interface to forums please?

2017-04-04 Thread Stephen Frost
Greetings Vinny, * vinny (vi...@xs4all.nl) wrote: > I meant it as "in an ideal world". It's a bit like buying a car > and finding out that they have not put the wheels on. It's not > difficult to put them on yourself, > but you kind of expect that the people who want you to user their > car would

Re: [GENERAL] browser interface to forums please?

2017-04-04 Thread vinny
On 2017-04-04 15:04, Stephen Frost wrote: Greetings, * vinny (vi...@xs4all.nl) wrote: And yes, I can probably setup my email to do something like that, the point is that I shouldn't have to. I'm all for improving things and adding automation where it'll help, but the infrastructure is

[GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-04 Thread Daniel Westermann
Hi, PostgreSQL 9.6.2 on CentOS 7.3 x64. This is my data set: drop table if exists users; drop table if exists ids; create table users ( user_id int , username varchar(50) ); with generator as ( select a.* from generate_series (1,300) a order by random() ) insert into users (

Re: [GENERAL] browser interface to forums please?

2017-04-04 Thread Stephen Frost
Greetings, * vinny (vi...@xs4all.nl) wrote: > The thing is; mailinglists are far from userfiendly if you are not > used to them. > Even in this thread several people have explained how much work they > have done to get it > into a state where they can easily work with it. Can you expect Joe >

Re: [GENERAL] Unexpected interval comparison

2017-04-04 Thread Vick Khera
On Tue, Apr 4, 2017 at 4:15 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > The previous expression intended to avoid decimal arithmetic, but > gcc optimizes the simple division better (using cmovns-add-sar) > than the current INT64_AU32 (jmp-sar) so I changed it. This > doesn't

Re: [GENERAL] browser interface to forums please?

2017-04-04 Thread Thomas Kellerer
vinny schrieb am 04.04.2017 um 12:01: > I'd love to have an RSS feed that contains only new questions, so I can just > watch the popup > on my screen the way I do with the rest of the world, and not have to deal > with replies to topics that I don't care about anyway. You can read them as a

Re: [GENERAL] browser interface to forums please?

2017-04-04 Thread vinny
On 2017-03-27 23:23, Steve Litt wrote: On Mon, 27 Mar 2017 11:31:02 +0900 Michael Paquier wrote: If you have subscribed to more mailing lists than -general, having one subfolder per list can also help a lot, grouping as well some of those having a low activity, for

Re: [GENERAL] "Reverse" inheritance?

2017-04-04 Thread vinny
On 2017-04-04 09:12, Tim Uckun wrote: I agree with the barking up the wrong tree, building a physical tree in tables doesn't sound right given that you will have to create a new branch in the tree when a new version/variation of ubuntu comes out. This doesn't bother me that much. It should.

Re: [GENERAL] Unexpected interval comparison

2017-04-04 Thread Kyotaro HORIGUCHI
Thank you for the comment. At Mon, 03 Apr 2017 11:35:25 -0400, Tom Lane wrote in <23053.1491233...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > Ok, the attached patch changes the result type of > > interval_cmp_value from

Re: [GENERAL] "Reverse" inheritance?

2017-04-04 Thread Tim Uckun
>I agree with the barking up the wrong tree, building a physical tree in tables doesn't sound right given that you will have to create a new branch in the tree when a new version/variation of ubuntu comes out. This doesn't bother me that much. If can say create table ubuntu_17_04 inherits ubuntu

Re: [GENERAL] "Reverse" inheritance?

2017-04-04 Thread vinny
I agree with the barking up the wrong tree, building a physical tree in tables doesn't sound right given that you will have to create a new branch in the tree when a new version/variation of ubuntu comes out. Also think about how you are going to do basic queries like listing all known unix