Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129661 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 5D61F1A00BC for ; Fri, 19 Dec 2025 22:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1766183934; bh=0Wyf2Gu+HuOUEdMhwvdObfs2+iQ0r6oXvp4iuNtNz/c=; h=Date:Subject:To:References:From:In-Reply-To:From; b=ViRdhBJpbnpqu7QHqGjk/qG7eSRPUtLt1YV59WEFAByJMMkTWPAU91g03SUovi0AH +SFeJ+JgUGf65/pzItij4WXLYoNMlI3p2MFtj93jfsP6m/xMXZJiO8OibCUgL/ioOX b9cM6CPwRhoROthKi9KmMPw79DeRB+wLqYSo6UA+frl2LTA3CdgVSEtJixZe8zj6En hRo/C4MD52hJl39pQHh8FSR7TE8+Po+Fvxykt1VSoWuSpDpCqW2Z+y+7aYqUEmcnfj k2wRVi+4tytKprxcB+w8KgDPWUWgbx2tsTyoj+8rf2y/9GcFpL1XOeaCCxKlX0sZ+u 4Kiq9nPQtwFGg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 89A251801DF for ; Fri, 19 Dec 2025 22:38:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from jessie.smtp.mailx.hosts.net.nz (jessie.smtp.mailx.hosts.net.nz [43.245.52.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 19 Dec 2025 22:38:41 +0000 (UTC) Received: from 122-57-27-239-adsl.sparkbb.co.nz ([122.57.27.239] helo=[192.168.1.67]) by jessie.smtp.mailx.hosts.net.nz with esmtpsa authed as varteg.nz (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.96) (envelope-from ) id 1vWj7H-007GO6-11 for internals@lists.php.net; Sat, 20 Dec 2025 11:38:31 +1300 Message-ID: <71b9ae2a-4313-475d-b733-4b0f3444c0d4@varteg.nz> Date: Sat, 20 Dec 2025 11:38:21 +1300 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] New function mysqli_quote_string To: internals@lists.php.net References: <23051439-6f0d-4175-b632-3b943582bfe0@beccati.com> Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Hosts-DKIM-Check: none From: Weedpacket@varteg.nz (Morgan) On 2025-12-20 04:09, Hans Henrik Bergan wrote: > > > > btw pg_escape_literal is mis-named. it does not escape - it quotes. > And there is an important difference between escaping and quoting, > at least for SQLite, it is impossible to make a binary-safe escape() > function, > but it's fully possible to make a binary-safe quote() function > (see https://github.com/php/php-src/pull/13972 php-src/pull/13972> ) > > IMO pg_escape_literal should be renamed pg_quote_literal. > quote_literal() is how PostgreSQL itself names the function, and it would be consistent with PHP's functions being named to reflect those that it wraps (à la mysqli_real_escape_string()). Instead, I think it got called pg_escape_string() by symmetry with mysql_escape_string().