From 2a0f262beff32ba86bcb58f3273214e5d0517c09 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 21:16:24 +0200 Subject: Merging upstream version 16.3. Signed-off-by: Daniel Baumann --- src/backend/nodes/read.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/backend/nodes/read.c') diff --git a/src/backend/nodes/read.c b/src/backend/nodes/read.c index 813eda3..5d76f56 100644 --- a/src/backend/nodes/read.c +++ b/src/backend/nodes/read.c @@ -498,14 +498,9 @@ nodeRead(const char *token, int tok_len) result = (Node *) makeString(debackslash(token + 1, tok_len - 2)); break; case T_BitString: - { - char *val = palloc(tok_len + 1); - - memcpy(val, token, tok_len); - val[tok_len] = '\0'; - result = (Node *) makeBitString(val); - break; - } + /* need to remove backslashes, but there are no quotes */ + result = (Node *) makeBitString(debackslash(token, tok_len)); + break; default: elog(ERROR, "unrecognized node type: %d", (int) type); result = NULL; /* keep compiler happy */ -- cgit v1.2.3