Re: JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Shay Rojansky <roji(at)roji(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)
Date: 2025-03-06 00:44:49
Message-ID: CAKFQuwYCrv-PvmWYVQibXX2QKq+0ggDwxuGm8vbmoY=ertQiZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, March 5, 2025, Shay Rojansky <roji(at)roji(dot)org> wrote:
>
> SELECT JSON_VALUE(jsonb '"AQID"', '$' RETURNING bytea); -- Expected
> 0x010203, got AQID
>

I get \x41514944 which is precisely what I would expect since it what this
query results in as well:

select 'AQID'::bytea;

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-03-06 00:46:45 Re: track generic and custom plans in pg_stat_statements
Previous Message Jacob Champion 2025-03-06 00:19:04 Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible