aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/psql/tab-complete.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 79fec81e223..69d94fc6b98 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3719,8 +3719,8 @@ _complete_from_query(int is_schema_query, const char *text, int state)
result = NULL;
/* Set up suitably-escaped copies of textual inputs */
- e_text = pg_malloc(string_length * 2 + 1);
- PQescapeString(e_text, text, string_length);
+ e_text = pg_malloc(byte_length * 2 + 1);
+ PQescapeString(e_text, text, byte_length);
if (completion_info_charp)
{