pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6181: concat_ws() incompatibility with MySQL
2+ messages / 2 participants
[nested] [flat]

* BUG #6181: concat_ws() incompatibility with MySQL
@ 2011-08-29 11:42  Itagaki Takahiro <itagaki.takahiro@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Itagaki Takahiro @ 2011-08-29 11:42 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      6181
Logged by:          Itagaki Takahiro
Email address:      itagaki.takahiro@gmail.com
PostgreSQL version: 9.1 RC1 (x86)
Operating system:   Windows 7 (64bit)
Description:        concat_ws() incompatibility with MySQL
Details: 

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'], '/')



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #6181: concat_ws() incompatibility with MySQL
@ 2011-08-29 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Itagaki Takahiro <itagaki.takahiro@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2011-08-29 16:27 UTC (permalink / raw)
  To: Itagaki Takahiro <itagaki.takahiro@gmail.com>; +Cc: pgsql-bugs

"Itagaki Takahiro" <itagaki.takahiro@gmail.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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-08-29 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 11:42 BUG #6181: concat_ws() incompatibility with MySQL Itagaki Takahiro <itagaki.takahiro@gmail.com>
2011-08-29 16:27 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox