SCM

[#1010988] field_name_index_table in NpgsqlRowDescription is corrupted when using non-ascii column names

View Trackers | Bugs | Download .csv | Monitor

Date:
2011-02-07 13:09
Priority:
3
State:
Open
Submitted by:
David Schmitt (davidschmitt)
Assigned to:
Nobody (None)
Npgsql Version:
2.0.11
Category:
Group:
Resolution:
None
Summary:
field_name_index_table in NpgsqlRowDescription is corrupted when using non-ascii column names

Detailed description
The following statement created an exception:

select "zurück" as zurück3_103_ from "Tabelle" tabellenhib0_


System.IndexOutOfRangeException occurred
Message=Field not found
Source=Npgsql
StackTrace:
at Npgsql.NpgsqlRowDescription.FieldIndex(String fieldName) in P:\tmp\Npgsql2.0.11.src\src\Npgsql\NpgsqlRowDescription.cs:line 204
InnerException:


This is caused by an encoding mismatch of the umlaut-u between the field_name_index_table (where it is stored in latin1) and the rest of the world, which speaks UTF-8

Followup

Message
Date: 2011-03-21 19:17
Sender: Francisco Figueiredo jr.

I also could check that if you wrap the column name with double quotes, this problem doesn't occur. If there is a way to tell nhibernate to double quote all column identifiers, it would work as a workaround.
Date: 2011-03-21 19:16
Sender: Francisco Figueiredo jr.


I sent a message to pgsql-general mailing list and Tom Lane thinks it is a problem with lowering case identifiers inside postgresql.

You can check the discussion here: http://archives.postgresql.org/pgsql-general/2011-03/msg00538.php

and here:
http://archives.postgresql.org/pgsql-hackers/2011-03/msg01198.php

And it is interesting your feedback because Tom thought it only happened in OSX and you seem to be saying it is also occurring on windows....
Date: 2011-02-07 14:01
Sender: David Schmitt

I've looked a bit further into this, but was not able to
locate the actual problem. Here my findings so far:

The database has ENCODING=UTF-8 and is running on windows.
Connecting to a similar 8.4.5 database running on debian
squeeze, the error vanishes.

Since the problem also appears when using pgAdminIII, I'm
leaning towards that being a problem with the windows
packages :-/

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge