Re: [HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-10 Thread Noah Misch
On Sun, Jun 09, 2013 at 11:39:18AM -0400, Tom Lane wrote: > The key point for me is that if tolower() actually does anything in the > previous state of the code, it's more than likely going to produce > invalidly encoded data. The consequences of that can't be good. > You can argue that there migh

Re: [HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-09 Thread Tom Lane
Andrew Dunstan writes: > On 06/09/2013 12:38 AM, Noah Misch wrote: >> PostgreSQL has lived with this wrong behavior since ... the beginning? It's >> a >> problem, certainly, but a bandage fix brings its own trouble. I don't see this as particularly bandage-y. It's a subset of the spec-required

[HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-09 Thread Andrew Dunstan
On 06/09/2013 12:38 AM, Noah Misch wrote: On Sat, Jun 08, 2013 at 11:50:53PM -0400, Andrew Dunstan wrote: On 06/08/2013 10:52 PM, Noah Misch wrote: Let's return to the drawing board on this one. I would be inclined to keep the current bad behavior until we implement the i18n-aware case foldin

[HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-08 Thread Noah Misch
On Sat, Jun 08, 2013 at 11:50:53PM -0400, Andrew Dunstan wrote: > On 06/08/2013 10:52 PM, Noah Misch wrote: >> Let's return to the drawing board on this one. I would be inclined to keep >> the current bad behavior until we implement the i18n-aware case folding >> required by SQL. If I'm alone in

[HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-08 Thread Andrew Dunstan
On 06/08/2013 10:52 PM, Noah Misch wrote: On Sat, Jun 08, 2013 at 08:09:15PM -0400, Robert Haas wrote: On Sat, Jun 8, 2013 at 10:25 AM, Andrew Dunstan wrote: Don't downcase non-ascii identifier chars in multi-byte encodings. Long-standing code has called tolower() on identifier character byt

[HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-08 Thread Noah Misch
On Sat, Jun 08, 2013 at 08:09:15PM -0400, Robert Haas wrote: > On Sat, Jun 8, 2013 at 10:25 AM, Andrew Dunstan wrote: > > Don't downcase non-ascii identifier chars in multi-byte encodings. > > > > Long-standing code has called tolower() on identifier character bytes > > with the high bit set. This

[HACKERS] Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding

2013-06-08 Thread Robert Haas
On Sat, Jun 8, 2013 at 10:25 AM, Andrew Dunstan wrote: > Don't downcase non-ascii identifier chars in multi-byte encodings. > > Long-standing code has called tolower() on identifier character bytes > with the high bit set. This is clearly an error and produces junk output > when the encoding is mu