[pgpool-general: 5477] Re: Backslash problem with pgpool

Tatsuo Ishii ishii at sraoss.co.jp
Wed May 17 01:20:29 JST 2017


> From: Tatsuo Ishii <ishii at sraoss.co.jp>
>>>> But with pgpool :
>>>> 
>>>> https:\\/\\/upload.domain.tld\\/get\\/img_0320-4.jpg
>>> 
>>> Interesting. Since ordinary text types do not behave like that
>>> (behaves same as PostgreSQL), I guess there's a problem with parsing
>>> JSON syntax. I will dig into this.
>>
>> Not reproduced here.
>>
>> test=# create table t1(j json);
> 
>> CREATE TABLE
>> test=# insert into t1 values('{"image_url":"https:\/\/upload.domain.tld\/get\/img_0320-4.jpg"}');
>> INSERT 0 1
>> test=# select * from t1;
>>                                 j                                
>> ------------------------------------------------------------------
>> {"image_url":"https:\/\/upload.domain.tld\/get\/img_0320-4.jpg"}
>> (1 row)
>> 
> 
>> This is Pgpool-II 3.5 stable head.
> 
> 
> Is there a possibility the standard_conforming_strings setting of the postgresql instance has any affect here?

No, I don't think so. Because if it's off, above INSERT should warn
and result will be different.

test=# insert into t1 values('{"image_url":"https:\/\/upload.domain.tld\/get\/img_0320-4.jpg"}');
WARNING:  nonstandard use of escape in a string literal
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
WARNING:  nonstandard use of escape in a string literal
LINE 1: insert into t1 values('{"image_url":"https:\/\/upload.domain...
                              ^
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
INSERT 0 1
test=# select * from t1;
                                j                                 
------------------------------------------------------------------
 {"image_url":"https://upload.domain.tld/get/img_0320-4.jpg"}


Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list