pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pg17.3 PQescapeIdentifier() ignores len
Date: Sat, 15 Feb 2025 13:33:54 +0100
Message-ID: <Z7CJsvNP95cv7euy@msg.df7cb.de> (raw)
In-Reply-To: <bukicrp3akqomk7lf6ywa7faxhxdnlcxnwfqx7tyeylemps2qi@gfrmkafkmcjx>
References: <Z64jD3u46gObCo1p@pryzbyj2023>
	<3718360.1739473209@sss.pgh.pa.us>
	<bukicrp3akqomk7lf6ywa7faxhxdnlcxnwfqx7tyeylemps2qi@gfrmkafkmcjx>

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





view thread (13+ messages)  latest in thread

Message-ID: <Z7CJsvNP95cv7euy@msg.df7cb.de>
Permalink:  ../Z7CJsvNP95cv7euy@msg.df7cb.de/
Also on:    postgresql.org/message-id/Z7CJsvNP95cv7euy@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: myon@debian.org, andres@anarazel.de, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg17.3 PQescapeIdentifier() ignores len
  In-Reply-To: <Z7CJsvNP95cv7euy@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox