Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87228 invoked from network); 1 Mar 2017 20:00:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2017 20:00:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam.baratz@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.54 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.214.54 mail-it0-f54.google.com Received: from [209.85.214.54] ([209.85.214.54:35640] helo=mail-it0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/12-65343-B6827B85 for ; Wed, 01 Mar 2017 15:00:44 -0500 Received: by mail-it0-f54.google.com with SMTP id 203so105530417ith.0 for ; Wed, 01 Mar 2017 12:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=77uz9tVR+QeGkcEoTphYpOD3wx1p6RjLaRGBeHSgt8U=; b=e26Ji5OtLHLSZr2Clo1c9FWuMDDrrGt6FgIcDMUIrAc5bwJ4ryAEiVx/QMdMefbzKM Y3YDbP2pVPtzi2+CEi2tlg140ZmcqB27C3XF21XxFA/IKrGpZSTFG7gxc+uRSJcU9Aop vGB//cn3vhAJCOvvKlTXpl5z5/6mcX6K1HXk0rBk9dWbTjdgJUyqt3wB4zxR2+jOQq9t s5Ejsj9ix3UlO9Ixrj37Ee8KAcquag0dufVeCWO5Z4usfUJpkODBZ5WOuYdiPq1Uvg84 jIIbeyXozcyQOp4Rwn8gXbUZaYJ8JvlbStOzqPIo+PVpsbmNuCPU/6F3xzXbHvI9IE9C GZVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=77uz9tVR+QeGkcEoTphYpOD3wx1p6RjLaRGBeHSgt8U=; b=A3VZrwjdgqSmjlnDWmGQ8I32F3mYznkZbsmcdAVxm3mjGDEbsk8qINuioGWiZ0rsqh bSu/7oqFWGaJQQhELxIpx97qgOg4bSuoywAka3Kl3i36W3qseSs8xBPy8aEERgsVlr1L NpGfp6y8m8WJkogJ0PejF9uXfbBeyxDjOI6ECJKfcBqH8HdYnifgK5bufdz3rQXJ44KX iPrBlfl+opMNm3NSVyBK7VJtW9UejRZmZgYohLjKl1fvnYcEdYSvQbRbuCyg7q70BcvH XbAcvIhaa3MKz435dSQ+bII6XdGNDQ5t812Gyo4Q+TLPTE4P9MkZsj072psdsj0Yw2El +mbQ== X-Gm-Message-State: AMke39kdwGjAMtl3QEsCxn9n0QF0NLbddP/POAsob+2OeD9EGYAMuLcHnZkYbRA+w4eGf3f+Ji3c9K3Z/kReNQ== X-Received: by 10.36.134.65 with SMTP id u62mr6134737itd.34.1488398441003; Wed, 01 Mar 2017 12:00:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.146.10 with HTTP; Wed, 1 Mar 2017 12:00:40 -0800 (PST) In-Reply-To: References: Date: Wed, 1 Mar 2017 15:00:40 -0500 Message-ID: To: Christopher Jones Cc: Andrea Faulds , Marco Pivetta , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c088fb85c67bb0549b0c4b4 Subject: Re: [PHP-DEV] Re: [RFC] Extended String Types For PDO From: adam.baratz@gmail.com (Adam Baratz) --94eb2c088fb85c67bb0549b0c4b4 Content-Type: text/plain; charset=UTF-8 > > Isn't the same quoting functionality available via the quote() method? > That's what the PR's tests use. > > I don't think it's orthogonal. There are various ways to quote strings > and a generic PDO solution should be flexible enough to handle all drivers. > Yes, they fit into the same general topic of string quoting, but I'd assign different levels of importance to national charset literals and alternate delimiters. Not being able to quote national charset literals means you can't produce correctly formed queries with two drivers. My understanding of alternate delimiters is that they make it easier to hand-writing queries. The quote function may not generate the most human-readable queries for some input, but the queries will be valid. There are a couple other complexities for alternate delimiters. Not all databases allow them and the options vary for each. For example, PostgreSQL's only alternative is dollar-quoting[1]. If you think it's important to handle this functionality, I think a separate RFC would be more appropriate. My guess is instance/statement attributes would be the better mechanism to control delimiters and you might want them to be driver-specific. Thanks, Adam --- [1] https://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING --94eb2c088fb85c67bb0549b0c4b4--