RE: Question about array_to_string()'s behavior and the behavior might be changed in the future or not

2019-01-16 Thread Egashira, Yusuke
Hi, Andrew Thank you for immediate replying. I'm relieved. Regards. -- Yusuke, Egashira -Original Message- From: Andrew Gierth [mailto:and...@tao11.riddles.org.uk] Sent: Thursday, January 17, 2019 3:56 PM To: Egashira, Yusuke/江頭 勇佑 Cc: 'pgsql-gene...@postgresql.org' Subject: Re:

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Andrew Gierth
> "Guillaume" == Guillaume Lelarge writes: >> I will see about fixing this, somehow. Guillaume> Thanks a lot. I've committed a fix (to all supported branches, since this bug actually precedes the addition of GROUPING SETS and can be triggered with a simple GROUP BY if you try hard

Re: Question about array_to_string()'s behavior and the behavior might be changed in the future or not

2019-01-16 Thread Andrew Gierth
> "Egashira" == Egashira, Yusuke writes: Egashira> Hi, Egashira> I have a question about array_to_string(). Egashira> I think array_to_string() concatenates always array elements Egashira> from the "beginning" of the array elements and this rule will Egashira> not be changed on the

Question about array_to_string()'s behavior and the behavior might be changed in the future or not

2019-01-16 Thread Egashira, Yusuke
Hi, I have a question about array_to_string(). I think array_to_string() concatenates always array elements from the "beginning" of the array elements and this rule will not be changed on the future minor releases. Is my understanding correct? For example, I understand that

Re: Can anyone please provide me list of customers using postgreSQL

2019-01-16 Thread Brent Wood
One comment I thought valuable after a large New Zealand Govt agency implemented a national GIS suite. This was their first install using Postgis instead of  the usual MS SQL Server. I asked how they found Postgis/Postgres as a platform. I got a very succinct reply. "It's so easy to connect

Re: Varlena with recursive data structures?

2019-01-16 Thread George Neuner
On Wed, 16 Jan 2019 22:08:35 +, Sam Patterson wrote: >Hi all, > >I've recently started developing an extension for Postgres for which I'll >need to create a new variable-length base type. The type will require a >tree-like structure in order to parse sufficiently, which of course >probably

Re: Varlena with recursive data structures?

2019-01-16 Thread Tom Lane
Sam Patterson writes: > I presume the purpose for using this approach is because all the data in a > varlena type has to be contiguous, and the moment you start using pointers > this is no longer possible. Yup. > So my question is, given a structure that looks > something like this, > typedef

Varlena with recursive data structures?

2019-01-16 Thread Sam Patterson
Hi all, I've recently started developing an extension for Postgres for which I'll need to create a new variable-length base type. The type will require a tree-like structure in order to parse sufficiently, which of course probably means having some sort of recursive data structure, like a struct

problem in regard to hot standby

2019-01-16 Thread aaaaaa
Hi all, I have encounted the problem with the hot standby, The master node was suddenly powered off,meanwhile,both two standby node had shut down end printed logs as followed: PG version:9.6.8 2019-01-13 09:35:42.831 CST,,,28904,,5c332ceb.70e8,5,,2019-01-07 18:41:47

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Guillaume Lelarge
Le mer. 16 janv. 2019 à 17:40, Andrew Gierth a écrit : > > "Andrew" == Andrew Gierth writes: > > "Guillaume" == Guillaume Lelarge writes: > > Guillaume> CASE grouping(to_char(b, 'MM')) > > Guillaume> ERROR: arguments to GROUPING must be grouping expressions of > the >

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: > "Guillaume" == Guillaume Lelarge writes: Guillaume> CASE grouping(to_char(b, 'MM')) Guillaume> ERROR: arguments to GROUPING must be grouping expressions of the Guillaume> associated query level Guillaume> LINE 3: CASE grouping(to_char(b,

Re: Array_agg and dimensions in Array

2019-01-16 Thread Alexey Bashtanov
Hi Mike, I have come across a problem which I cant seem to solve in a nice way Basically I have a (small) table of tags What I need to is combine two concatenated fields with a literal value as an array element. You can create a custom aggregate function like this: alexey@[local]/alexey=#

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Andrew Gierth
> "Guillaume" == Guillaume Lelarge writes: Guillaume> CASE grouping(to_char(b, 'MM')) Guillaume> ERROR: arguments to GROUPING must be grouping expressions of the Guillaume> associated query level Guillaume> LINE 3: CASE grouping(to_char(b, 'MM')) WHEN 1 THEN 'some date' ...

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Pavel Stehule
st 16. 1. 2019 v 13:51 odesílatel Guillaume Lelarge napsal: > Hi, > > One of my customers found something quite weird on his 9.6 cluster. Here > is a quick demo showing the issue: > > -- quick demo table > CREATE TABLE t1 (a integer, b timestamp, c integer); > > -- a working query > SELECT >

Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Guillaume Lelarge
Hi, One of my customers found something quite weird on his 9.6 cluster. Here is a quick demo showing the issue: -- quick demo table CREATE TABLE t1 (a integer, b timestamp, c integer); -- a working query SELECT CASE grouping(a) WHEN 1 THEN 'some text' ELSE a::text END AS new_a, CASE WHEN

Re: lost "left join"

2019-01-16 Thread Andrew Gierth
> "Олег" == Олег Самойлов writes: Олег> Hi, all. Олег> I got some mystic behaviour of PostgreSQL, perhaps this is a bug. Feature, actually. Олег> But things begin be strange if I add validation by time. Олег> => explain select * from node as parent left join link on Олег>

Re: Can anyone please provide me list of customers using postgreSQL

2019-01-16 Thread Andreas Kretschmer
Am 15.01.19 um 20:42 schrieb Ramamoorthi, Meenakshi: Dear folks: 1)Can someone please send me a link of all companies using PostgreSQL ? you can find some case studies here: https://www.2ndquadrant.com/en/about/case-studies/ We have a lot more customers, but i can't list them here,

Sv: lost "left join"

2019-01-16 Thread Andreas Joseph Krogh
På onsdag 16. januar 2019 kl. 11:54:21, skrev Олег Самойлов mailto:spl...@ya.ru>>: Hi, all. I got some mystic behaviour of PostgreSQL, perhaps this is a bug.   [snip] But things begin be strange if I add validation by time. => explain select * from node as parent left join link on

lost "left join"

2019-01-16 Thread Олег Самойлов
Hi, all. I got some mystic behaviour of PostgreSQL, perhaps this is a bug. Tables is a model of a simple graph where parents and children related as «many to many». And there is a field «valid» to validate for current moment. set search_path = 'left_join'; begin; drop schema if exists

Re: Read consistency when using synchronous_commit=off

2019-01-16 Thread Ron
A crash-unsafe database is for data you don't care about. On 1/16/19 2:27 AM, pshadangi wrote: Thanks Ravi for the clarification, we will go ahead with "synchronous_commit=off". On Wed, Jan 16, 2019 at 10:47 AM Ravi Krishna > wrote: Sorry I

Re: Read consistency when using synchronous_commit=off

2019-01-16 Thread pshadangi
Thanks Ravi for the clarification, we will go ahead with "synchronous_commit=off". On Wed, Jan 16, 2019 at 10:47 AM Ravi Krishna wrote: > Sorry I misunderstood. The term "read consistency" is generally used > either in the context of isolation level or in the context of slaves. > > We don't