Re: pg17.3 PQescapeIdentifier() ignores len - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: pg17.3 PQescapeIdentifier() ignores len
Date
Msg-id Z7CJsvNP95cv7euy@msg.df7cb.de
Whole thread Raw
In response to Re: pg17.3 PQescapeIdentifier() ignores len  (Andres Freund <andres@anarazel.de>)
Responses Re: pg17.3 PQescapeIdentifier() ignores len
List pgsql-hackers
Re: Andres Freund
> > > The fprintf suggests that since 5dc1e42b4 PQescapeIdentifier ignores its len.
> > 
> > Ugh, yes.  Need something like the attached.
> 
> I just pushed this fix, together with an expansion of test_escape.c. With the
> expanded test both uses of strlen() are detected.

FTR, this is also caught by pygresql's regression tests:

test_inserttable_with_dotted_table_name
(tests.test_classic_connection.TestInserttable.test_inserttable_with_dotted_table_name)... ERROR
 

https://ci.debian.net/packages/p/pygresql/testing/amd64/57838998/
https://qa.debian.org/excuses.php?package=postgresql-17

What's missing in the PG regression tests to see that problem?

Christoph



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: Expanding HOT updates for expression and partial indexes
Next
From: Andrew Dunstan
Date:
Subject: Re: Decision by Monday: PQescapeString() vs. encoding violation