Обсуждение: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
The following bug has been logged online: Bug reference: 5869 Logged by: David Schmitt Email address: david@dasz.at PostgreSQL version: 8.4.5 Operating system: Windows 7 Description: postgresql corrupts unquoted non-ascii chars in column aliases Details: Example query: SELECT column as zurück FROM table; results in corruption of the "ü" (umlaut u). This causes Npgsql to fail to match up the columns in the result set (see http://pgfoundry.org/tracker/?func=detail&aid=1010988&group_id=1000140&atid= 590) and pgadminIII doesn't display the alias in the result pane. The same query works with the same tools against a 8.4.5 running on Debian squeeze. If the alias is quoted like this: SELECT column as "zurück" FROM table; the query also works against the DB running on windows. PS: I tried downloading the newest version of the one click installer for windows from EnterpriseDB, and noticed that since recently that site requires a registration :-(
On Tue, Feb 8, 2011 at 2:19 AM, David Schmitt <david@dasz.at> wrote: > Example query: > > =A0SELECT column as zur=FCck FROM table; > > results in corruption of the "=FC" (umlaut u). This causes Npgsql to fail= to > match up the columns in the result set (see > http://pgfoundry.org/tracker/?func=3Ddetail&aid=3D1010988&group_id=3D1000= 140&atid=3D > 590) and pgadminIII doesn't display the alias in the result pane. That link doesn't show anything interesting when I look at it. What exactly do you mean by corrupted? > The same query works with the same tools against a 8.4.5 running on Debian > squeeze. > > If the alias is quoted like this: > > =A0SELECT column as "zur=FCck" FROM table; > > the query also works against the DB running on windows. > > PS: I tried downloading the newest version of the one click installer for > windows from EnterpriseDB, and noticed that since recently that site > requires a registration :-( I think this has been fixed. Please let me know if not. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Thu, Mar 3, 2011 at 11:51 AM, David Schmitt <david@dasz.at> wrote: > On 03.03.2011 16:08, Robert Haas wrote: >> >> On Tue, Feb 8, 2011 at 2:19 AM, David Schmitt<david@dasz.at> =A0wrote: >>> >>> Example query: >>> >>> =A0SELECT column as zur=FCck FROM table; >>> >>> results in corruption of the "=FC" (umlaut u). This causes Npgsql to fa= il >>> to >>> match up the columns in the result set (see >>> >>> http://pgfoundry.org/tracker/?func=3Ddetail&aid=3D1010988&group_id=3D10= 00140&atid=3D >>> 590) and pgadminIII doesn't display the alias in the result pane. >> >> That link doesn't show anything interesting when I look at it. =A0What >> exactly do you mean by corrupted? > > There are some garbage bytes instead of the umlaut. I'm not really an encoding guy, but I would think that someone who is would want to know exactly what bytes you were ending up with. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
От
David Schmitt
Дата:
On 03.03.2011 16:08, Robert Haas wrote: > On Tue, Feb 8, 2011 at 2:19 AM, David Schmitt<david@dasz.at> wrote: >> Example query: >> >> SELECT column as zurück FROM table; >> >> results in corruption of the "ü" (umlaut u). This causes Npgsql to fail to >> match up the columns in the result set (see >> http://pgfoundry.org/tracker/?func=detail&aid=1010988&group_id=1000140&atid= >> 590) and pgadminIII doesn't display the alias in the result pane. > > That link doesn't show anything interesting when I look at it. What > exactly do you mean by corrupted? There are some garbage bytes instead of the umlaut. >> The same query works with the same tools against a 8.4.5 running on Debian >> squeeze. >> >> If the alias is quoted like this: >> >> SELECT column as "zurück" FROM table; >> >> the query also works against the DB running on windows. >> >> PS: I tried downloading the newest version of the one click installer for >> windows from EnterpriseDB, and noticed that since recently that site >> requires a registration :-( > > I think this has been fixed. Please let me know if not. I presume there is a new 8.4.5 version at enterprisedb.com ? I'll have a look at it later. Best Regards, David -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg
On Fri, Mar 4, 2011 at 5:04 AM, David Schmitt <david@dasz.at> wrote: > Ehh, I deserved that. Please see the attached screenshot for a demo of the > problem. It is really easy to reproduce and I just re-tested the current > 8.4.7-1-windows installer from enterprisedb.com. Hmm, interesting. I don't see garbage there; I see nothing. Actually, that's what I get on MacOS X, too. For example, the following two statements produce identical output: SELECT 1 AS xx SELECT 1 AS x=FCx In case it comes through garbled, the second one is x-umlaut-x on my system. The umlaut isn't included in the resulting column header. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company