postgresql renders ' ' ' as ' "" ' in a returned query from kexi

Bug #1213336 reported by Anne Wainwright on 2013-08-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
koffice
Fix Released
Critical
calligra (Ubuntu)
Undecided
Unassigned

Bug Description

This is fixed in current stable kexi 2.7.1 but (using Mint 14 Nadia = Ubuntu Quantal) we are only up to 2.5.3

currently every exported data set has to be run through a perl script to handle the effects of this in various ways. thus:

'quoting issues in postgresql' shows as ""quoting issues in postgresql""
postgresql's shows as postgresql""s
programmers' shows as postgresqls""

can we get this upgraded please?

anne / ian

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

Setting 2.5.0 as the version since it will be fixed for 2.5, 2.6 and later.

Created attachment 78767
Proper escaping

Created attachment 78768
Actual behavior

Still not fixed, -> 2.7

Changed in koffice:
importance: Unknown → Critical
status: Unknown → Fix Released

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

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

Philip Muškovac (yofel) wrote :

Kexi is part of calligra these days.

affects: koffice (Ubuntu) → calligra (Ubuntu)

Hello, the bug 318129 has been resolved today:
https://bugs.kde.org/show_bug.cgi?id=318129
Please use Calligra 2.7 branch in git or wait for 2.7.3 release (early
September 2013).

On 17 August 2013 11:22, Anne Wainwright <email address hidden> wrote:
> Public bug reported:
>
> This is fixed in current stable kexi 2.7.1 but (using Mint 14 Nadia =
> Ubuntu Quantal) we are only up to 2.5.3
>
> currently every exported data set has to be run through a perl script to
> handle the effects of this in various ways. thus:
>
> 'quoting issues in postgresql' shows as ""quoting issues in postgresql""
> postgresql's shows as postgresql""s
> programmers' shows as postgresqls""
>
> can we get this upgraded please?
>
> anne / ian
>
> ** Affects: koffice (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to koffice
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1213336
>
> Title:
> postgresql renders ' ' ' as ' "" ' in a returned query from kexi
>
> Status in “koffice” package in Ubuntu:
> New
>
> Bug description:
> This is fixed in current stable kexi 2.7.1 but (using Mint 14 Nadia =
> Ubuntu Quantal) we are only up to 2.5.3
>
> currently every exported data set has to be run through a perl script
> to handle the effects of this in various ways. thus:
>
> 'quoting issues in postgresql' shows as ""quoting issues in postgresql""
> postgresql's shows as postgresql""s
> programmers' shows as postgresqls""
>
> can we get this upgraded please?
>
> anne / ian
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/koffice/+bug/1213336/+subscriptions

--
regards / pozdrawiam, Jaroslaw Staniek
 Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org
 Qt for Tizen | http://qt-project.org/wiki/Tizen
 Qt Certified Specialist | http://www.linkedin.com/in/jstaniek

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.