summaryrefslogtreecommitdiffstats
path: root/src/backend/nodes/read.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:16:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:16:24 +0000
commit2a0f262beff32ba86bcb58f3273214e5d0517c09 (patch)
tree24c0ad10dab36bbd5c22743d3c88c4e0ccd5bc65 /src/backend/nodes/read.c
parentReleasing progress-linux version 16.2-2~progress7.99u1. (diff)
downloadpostgresql-16-2a0f262beff32ba86bcb58f3273214e5d0517c09.tar.xz
postgresql-16-2a0f262beff32ba86bcb58f3273214e5d0517c09.zip
Merging upstream version 16.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/backend/nodes/read.c')
-rw-r--r--src/backend/nodes/read.c11
1 files changed, 3 insertions, 8 deletions
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 */