[Mono-devel-list] Npgsql breaks multi-line queries

Jaroslaw Kowalski jaak at jkowalski.net
Thu Jul 28 13:40:37 EDT 2005


I found that Npgsql client breaks multi-line queries by removing newline
characters. This leads to improper sql being sent do postgresql.

The following CommandText

select a as b
from C

is sent as "select a as bfrom C" which is obviously an error because the 
space between "b" and "from" is missing. This is because RegExp used to 
filter parameters doesn't use RegexOptions.Singleline option.

I'm attaching a patch against SVN trunk which fixes the problem.

Would anyone care to apply it?

Jaroslaw Kowalski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: npgsql.diff
Type: application/octet-stream
Size: 473 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050728/0c4083b4/attachment.obj 

More information about the Mono-devel-list mailing list