Re: BUG #18340: BitString may break nodetoString() conversion for a raw parse tree - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18340: BitString may break nodetoString() conversion for a raw parse tree
Date
Msg-id 2565845.1707838472@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18340: BitString may break nodetoString() conversion for a raw parse tree  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> When a server compiled with -DWRITE_READ_PARSE_PLAN_TREES, the following
> query:
> SELECT x' 0';
> produces:
> ERROR:  did not find '}' at end of input node

> Observed starting from commit 40ad8f9de, which implemented
> WRITE_READ_PARSE_PLAN_TREES for raw parse trees.

Bleah.  That's presumably my fault, will take a look.

> More interesting results may be obtained (e.g.,
> WARNING:  outfuncs/readfuncs failed to produce an equal raw parse tree
> ), but with raw trees only, not with node trees stored in the database,
> considering core code.
> Still codesearch.debian.net shows that nodeToString() used by several
> extensions: pg_qual_stats, pgpool2, hypopg, pglogical; perhaps some of
> them use that conversion unsafely (without processing a node with
> transformExpr() or so).

I doubt there's any reason to consider this a critical problem
right now.  We should fix it of course, in the expectation that
we might need it to work someday.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18340: BitString may break nodetoString() conversion for a raw parse tree
Next
From: PG Bug reporting form
Date:
Subject: BUG #18341: SIGBUS with > 4GB DSM and 'dynamic_shared_memory_type = mmap'