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

Bug #1213336 reported by Anne Wainwright
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
koffice
Fix Released
Critical
calligra (Ubuntu)
New
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

Revision history for this message
In , Jaroslaw Staniek (staniek) wrote :

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

Revision history for this message
In , Jaroslaw Staniek (staniek) wrote :

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

Revision history for this message
In , Jaroslaw Staniek (staniek) wrote :

Created attachment 78767
Proper escaping

Revision history for this message
In , Jaroslaw Staniek (staniek) wrote :

Created attachment 78768
Actual behavior

Revision history for this message
In , Jaroslaw Staniek (staniek) wrote :

Still not fixed, -> 2.7

Revision history for this message
In , Jaroslaw Staniek (staniek) wrote :
Revision history for this message
In , Adam Pigg (adam-piggz) wrote :
Changed in koffice:
importance: Unknown → Critical
status: Unknown → Fix Released
Revision history for this message
In , Adam Pigg (adam-piggz) wrote :

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

Revision history for this message
In , Adam Pigg (adam-piggz) wrote :

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

Revision history for this message
Philip Muškovac (yofel) wrote :

Kexi is part of calligra these days.

affects: koffice (Ubuntu) → calligra (Ubuntu)
Revision history for this message
Jaroslaw Staniek (staniek) wrote : Re: [Bug 1213336] [NEW] postgresql renders ' ' ' as ' "" ' in a returned query from kexi

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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