← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 887057] [NEW] resource-table-generation-does-not-escape-unsafe-characters

 

Hi Bob. I think you are sort of missing the point however.

This is not a production server first of all, but a somewhat
arbitrarily chosen distribution. No reason I guess that people COULD
not use this distro if they do desired.

UiO has also upgraded their database cluster to 9.1 recently ( I think
if read the mails correctly) so it seems it might be a good idea to be
able to run on that one.

And there is nothing we can really do to prevent people from upgrading
to 9.1, should they want, regardless of what we say.

I think it is fine, as long as we make clear we do not support
Postgres 9.1 out of the box and let people know about it, otherwise,
it needs to be fixed.
The appropriate behaviour for the client would be to determine what
the quoting syntax actually is  (e.g E''foo' , '\'foo' or '''foo') and
use this. Since quick utilizes INSERT statements the escape characters
need to be handled gracefully and correctly, which in this case they
seem not to be.

The appropriate escape syntax for single quotes is ('') instead of the
more dangerous \' syntax and there seems no reason not to support it.
Need I remind anyone of the classic http://xkcd.com/327/?

Regards,
Jason



On Mon, Nov 7, 2011 at 3:47 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> On 07/11/2011, Jason Pickering <jason.p.pickering@xxxxxxxxx> wrote:
>> OK. I managed to get to the bottom of this, as it was not happening in
>> previous versions of Postgresql.
>>
>> The default postgres version on Ubuntu 11.10 is 9.1.
>
> OK.  Mind you I don't think we should be running production systems on
> ubuntu 11.10.  My recommendation has been to stick with 10.04 LTS with
> support through to mid 2015..
>
>>
>> Somewhere ( I am not 100% sure, but suppose quick) the quotes are
>> being escaped with back slashes. This is sort of fine in earlier
>> version of Postgresql, but not with 9.1 at least with the default
>> settings. In order to get this to work with 9.1, you need to edit your
>> postgresql.conf file
>>
>>
>> backslash_quote = on    # on, off, or safe_encoding. Default in 9.1 is
>> safe_encoding.
>> standard_conforming_strings = off # Default in 9.1 is ON
>>
>> This is a workaround until this gets fixed properly.
>>
>> Regards,
>> Jason
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>


Follow ups

References