Fix reading of BitString nodes
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 24 Sep 2022 22:10:52 +0000 (18:10 -0400)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 24 Sep 2022 22:10:52 +0000 (18:10 -0400)
commit2cb1a5a8d4aeb63da2d6a2d22169f05c60bb5828
tree74b93b484a998d20c9c996d0540d784d85dccd83
parent43f4b349152d972c711592b8e8a4645aea9625f4
Fix reading of BitString nodes

The node tokenizer went out of its way to store BitString node values
without the leading 'b'.  But everything else in the system stores the
leading 'b'.  This would break if a BitString node is
read-printed-read.

Also, the node tokenizer didn't know that BitString node tokens could
also start with 'x'.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/4159834.1657405226@sss.pgh.pa.us
src/backend/nodes/read.c