On 10/24/2018 11:54 AM, Tom Lane wrote:
"David G. Johnston" writes:
The following does seem buggy though:
select json '{ "a": "null \u escape"}' -> 'a' as fails;
Perhaps, but AFAICS it's entirely accidental that any variant of this
doesn't fail. Although this manages not to fail:
regr
Hi
> I could get behind fixing
> it to always throw the error, but that's not what Sergei was hoping for.
On the contrary i think it is reasonable way. It is much better to have error
on input value instead of finding wrong value during table processing. We
always reject this value for jsonb and
"David G. Johnston" writes:
> The following does seem buggy though:
> select json '{ "a": "null \u escape"}' -> 'a' as fails;
Perhaps, but AFAICS it's entirely accidental that any variant of this
doesn't fail. Although this manages not to fail:
regression=# select json '{ "a": "null \u
Hi
24.10.2018, 17:40, "David G. Johnston" :
> On Wed, Oct 24, 2018 at 7:25 AM Sergei Kornilov wrote:
>
>> DETAIL: \u cannot be converted to text.
>>
>> Well, requested text type can not have \u byte. But seems strange: we
>> test json type with this value but raise same error for -> ope
On Wed, Oct 24, 2018 at 7:25 AM Sergei Kornilov wrote:
>
> DETAIL: \u cannot be converted to text.
>
> Well, requested text type can not have \u byte. But seems strange: we
> test json type with this value but raise same error for -> operator:
>
> We allow write such json to table, we al
Hi
We have some json regression tests in
src/test/regress/expected/json_encoding_1.out with \u symbol
select json '{ "a": "null \u escape" }' as not_unescaped;
not_unescaped
{ "a": "null \u escape" }
(1 row)
select json '{ "a":