Bug 318129 - Single quote ' stored as double " in postgresql
Summary: Single quote ' stored as double " in postgresql
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: KexiDB (show other bugs)
Version: 2.5.0
Platform: Compiled Sources All
: HI critical
Target Milestone: 2.7
Assignee: Jarosław Staniek
URL: http://forum.kde.org/viewtopic.php?f=...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 12:01 UTC by Jarosław Staniek
Modified: 2013-08-23 09:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.7.3
Sentry Crash Report:


Attachments
Proper escaping (69.57 KB, image/png)
2013-04-10 12:05 UTC, Jarosław Staniek
Details
Actual behavior (58.61 KB, image/png)
2013-04-10 12:06 UTC, Jarosław Staniek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2013-04-10 12:01:49 UTC
This report is based on the forum http://forum.kde.org/viewtopic.php?f=221&t=110765:

When I retrieve data entered via kexi any single ' quotes are replaces with doubled ".  
Eg. 'The Berea' shows up as ""The Berea"".

Whether I retrieve the data via kexi or via a direct sql query on the database makes no difference.

Reproducible: Always
Comment 1 Jarosław Staniek 2013-04-10 12:04:05 UTC
Setting 2.5.0 as the version since it will be fixed for 2.5, 2.6 and later.
Comment 2 Jarosław Staniek 2013-04-10 12:05:21 UTC
Created attachment 78767 [details]
Proper escaping
Comment 3 Jarosław Staniek 2013-04-10 12:06:58 UTC
Created attachment 78768 [details]
Actual behavior
Comment 4 Jarosław Staniek 2013-08-01 22:06:09 UTC
Still not fixed, -> 2.7
Comment 5 Jarosław Staniek 2013-08-18 22:56:48 UTC
Related report for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/koffice/+bug/1213336
Comment 6 Adam Pigg 2013-08-23 07:49:00 UTC
Fixed in this commit
http://commits.kde.org/calligra/ca9d1c3574b772e1d2ce0c2641c4e9a63c17f64b
Comment 7 Adam Pigg 2013-08-23 08:47:11 UTC
Git commit 2002b62058ad7069681d0aa7cb03b0cd80e099b6 by Adam Pigg.
Committed on 23/08/2013 at 07:36.
Pushed by piggz into branch 'calligra/2.7'.

Fixed postgresql escaping

properly escape the ' character with \'
re-ordered the escape order so that \' isnt double escaped to \\'
tested with the following strings
hi
hi's
'hi'
\o/ hi \o/
\' \'

M  +2    -2    kexi/kexidb/drivers/pqxx/pqxxdriver.cpp

http://commits.kde.org/calligra/2002b62058ad7069681d0aa7cb03b0cd80e099b6
Comment 8 Adam Pigg 2013-08-23 08:56:57 UTC
Git commit a1ad4ceb78a8f72ddf3015910f0886acbb150283 by Adam Pigg.
Committed on 23/08/2013 at 07:36.
Pushed by piggz into branch 'calligra/2.6'.

Fixed postgresql escaping

properly escape the ' character with \'
re-ordered the escape order so that \' isnt double escaped to \\'
tested with the following strings
hi
hi's
'hi'
\o/ hi \o/
\' \'

M  +2    -2    kexi/kexidb/drivers/pqxx/pqxxdriver.cpp

http://commits.kde.org/calligra/a1ad4ceb78a8f72ddf3015910f0886acbb150283