Skip to content

Error while parsing a JSON_TABLE statement with placeholders in it #127

@priyanshi-yb

Description

@priyanshi-yb

If there is a select statement having JSON_TABLE syntax with placeholders in place of constant data -

SELECT jt.* FROM
 my_films,
 JSON_TABLE (js, $1
   PASSING $2 AS filter, $3 AS filter2
     COLUMNS (
     id FOR ORDINALITY,
     kind text PATH '$.kind',
     title text FORMAT JSON PATH '$.films[*].title' OMIT QUOTES,
     director text PATH '$.films[*].director' KEEP QUOTES)) AS jt

this is the error comes while parsing this query using the Parse() function -

ERROR:  only string constants are supported in JSON_TABLE path specification

cc: @lfittl @msepga
Is this a bug or an expected failure?
Do you think there's any workaround to be able to parse this statement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions