Re: BUG #6181: concat_ws() incompatibility with MySQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Itagaki Takahiro" <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6181: concat_ws() incompatibility with MySQL
Date: 2011-08-29 16:27:43
Message-ID: 23079.1314635263@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Itagaki Takahiro" <itagaki(dot)takahiro(at)gmail(dot)com> writes:
> For query concat_ws('/', NULL, 'X'),
> PostgreSQL 9.1 returns '/X', but MySQL returns 'X'.

> I think postgres should return 'X' because of compatibility.
> Another reason is that both of the two queries below return 'X'.

> - concat_ws('/', 'X', NULL)
> - array_to_string(ARRAY[NULL, 'X'], '/')

Yeah, I think you're right. Fortunately it's not too late to change
this without introducing backwards-compatibility issues of our own.
Will fix.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-08-29 16:45:36 Re: the '::' cast doesn't work in the FROM clause
Previous Message Alexey Klyukin 2011-08-29 15:31:48 Re: the '::' cast doesn't work in the FROM clause