| From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Cc: | yishundinesh(at)gmail(dot)com |
| Subject: | BUG #19643: Output of jsonb_populate_recordset not consistent with documentation description |
| Date: | 2026-08-28 12:42:44 |
| Message-ID: | 19643-eadf5dc7e134dd3e@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 19643
Logged by: Balaji Venkatesan
Email address: yishundinesh(at)gmail(dot)com
PostgreSQL version: 18.6
Operating system: Ubuntu
Description:
As per the documentation jsonb_populate_record "Expands the object in
from_json to a row whose columns match the record type defined by base".
The example given the documentation is working fine, but if I replace
null::myrow with Row(('a'::text,'b'::text), the output discards
from_json(second argument completely)
First argument's value is being used instead of using it as a key
Eg:
select * from
jsonb_populate_recordset(ROW('a'::text,'b'::text),'[{"a":"test","b":"55"}]')
as (a text, b text)
Output::
a,b
Expected output:
test,55
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2026-08-28 13:16:14 | Re: BUG #19642: Include column name in error message when varchar(n) length limit is exceeded |
| Previous Message | Andrey Rachitskiy | 2026-08-28 08:53:59 | Re: BUG #19487: Error while executing SQL query involving XML parsing |