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
hi, it seems like some stuff is going wrong with cast-ed jsonb dereferencing:
import*aspgsqlAstParserfrom'pgsql-ast-parser'constinput=`select json->'foo'::text->>'bar'::text as bar from json_table`constast=pgsqlAstParser.parse(input)[0]constoutput=pgsqlAstParser.toSql.statement(ast)console.log(output)// SELECT ((((json->'foo')::text )->>'bar')::text ) AS bar FROM **table_with_json
So you can see it casts json->'foo' to text, and then when we try to do ->>'bar', there will be an error because ->> is an operator on jsonb, not text.
The text was updated successfully, but these errors were encountered:
hi, it seems like some stuff is going wrong with cast-ed jsonb dereferencing:
So you can see it casts
json->'foo'
to text, and then when we try to do->>'bar'
, there will be an error because->>
is an operator on jsonb, not text.The text was updated successfully, but these errors were encountered: