pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
5+ messages / 2 participants
[nested] [flat]

* BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
@ 2011-02-08 07:19 David Schmitt <david@dasz.at>
  2011-03-03 15:08 ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: David Schmitt @ 2011-02-08 07:19 UTC (permalink / raw)
  To: pgsql-bugs


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 :-(



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

* Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
  2011-02-08 07:19 BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
@ 2011-03-03 15:08 ` Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:51   ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
  0 siblings, 1 reply; 5+ messages in thread

From: Robert Haas @ 2011-03-03 15:08 UTC (permalink / raw)
  To: David Schmitt <david@dasz.at>; +Cc: pgsql-bugs

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?

> 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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

* Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
  2011-02-08 07:19 BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
  2011-03-03 15:08 ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
@ 2011-03-03 16:51   ` David Schmitt <david@dasz.at>
  2011-03-03 17:10     ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: David Schmitt @ 2011-03-03 16:51 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-bugs

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



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

* Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
  2011-02-08 07:19 BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
  2011-03-03 15:08 ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:51   ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
@ 2011-03-03 17:10     ` Robert Haas <robertmhaas@gmail.com>
  2011-03-04 20:42       ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Robert Haas @ 2011-03-03 17:10 UTC (permalink / raw)
  To: David Schmitt <david@dasz.at>; +Cc: pgsql-bugs

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>  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.

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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

* Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases
  2011-02-08 07:19 BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
  2011-03-03 15:08 ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
  2011-03-03 16:51   ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
  2011-03-03 17:10     ` Re: BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases Robert Haas <robertmhaas@gmail.com>
@ 2011-03-04 20:42       ` Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Robert Haas @ 2011-03-04 20:42 UTC (permalink / raw)
  To: David Schmitt <david@dasz.at>; +Cc: pgsql-bugs

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üx

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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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


end of thread, other threads:[~2011-03-04 20:42 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08 07:19 BUG #5869: postgresql corrupts unquoted non-ascii chars in column aliases David Schmitt <david@dasz.at>
2011-03-03 15:08 ` Robert Haas <robertmhaas@gmail.com>
2011-03-03 16:51   ` David Schmitt <david@dasz.at>
2011-03-03 17:10     ` Robert Haas <robertmhaas@gmail.com>
2011-03-04 20:42       ` Robert Haas <robertmhaas@gmail.com>

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