You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] JSQLParser 5.4-SNAPSHOT : PostgreSQL : json_populate_record row expansion with (…). * not supported #2412
Row expansion from a composite value using (expression).*.
In PostgreSQL, functions like json_populate_record return a composite record, and (record_expression).* expands it into individual columns. This syntax is commonly used when inserting JSON data into typed tables.
CREATETABLEusers (
id int,
name text,
age int
);
CREATETABLEstaging_users (
data json
);
INSERT INTO staging_users VALUES
('{"id":1,"name":"Alice","age":30}'),
('{"id":2,"name":"Bob","age":25}');
INSERT INTO users
SELECT (json_populate_record(NULL::users, data)).*FROM staging_users;
Parsing Error
ParseException: Encountered: "." / ".", at line 2, column 49, in lexical state DEFAULT. Was expecting one of these terminals within expansion starting at 1347:23:
Activity
fix: support PostgreSQL composite row expansion (function()).* (JSQLP…