Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3251 invoked from network); 28 Feb 2017 13:58:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2017 13:58:19 -0000 Authentication-Results: pb1.pair.com header.from=adam.baratz@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.46 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.214.46 mail-it0-f46.google.com Received: from [209.85.214.46] ([209.85.214.46:38037] helo=mail-it0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/27-62026-9F185B85 for ; Tue, 28 Feb 2017 08:58:18 -0500 Received: by mail-it0-f46.google.com with SMTP id y135so9466629itc.1 for ; Tue, 28 Feb 2017 05:58:17 -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=7tSYZESne38HNUplNnJbIwZ97xS02gZgeL2s9Vthx9o=; b=DBmxgUcNbe6LqAUM76zHVIt/u3GIuNoFnn78b29RT4dlwRko6eCUh5ysWTsrhL/g/g qM4hMX+glXINN7k7D5Ssj57yIHflG5cakFNpC6HF/t9XPQahr17dkKr8HOWxHCH4daxi VI8Y+T3wYjyqE/qPvnvYprtLfUTxoKCczWYPzDypboj+wE7WDLENHUtKfT6lrRUwQ+23 +CzFNUrkDE3k7jkQSNQswc1Irfrqm1gZvHP9N4zbQs031xtVKZ/J46jj7jb3vbBLhyH8 rIrBX42h9Vo8MX5EgrxX50nbZEN3YhUujDvnEo+W7NtvwVHoVI5pQMgzZ+WT429LAiNb i4/A== 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=7tSYZESne38HNUplNnJbIwZ97xS02gZgeL2s9Vthx9o=; b=nowsCylYlgS842QCdsjYA16VLMZCYsvbqr8VtS9QiD51UaNtszWFxfMgCHaa2arzyj iIbxEQhagWcFIenLBt5If7GPrfF/SgC+k+pZEtXt04PLeh/Cq4zLpFIco/trUjjNcEtW ZC2OQ0VNLdPcYYa4EqM9DROC3ozHsH+aF4pwJzofAmsmS2LyjZ+puND25let22q39sxe e3uIy5bdawjTxcdWfeRK91uP7fIazo1t7Zo7mx6BRcjeezBMBoarUBvAH28EKWrQn9gf wgUpVFm697VCicfomwWqF92jiIz3gbcw3nK8wBhm+k7NUjNsugHtwc9ovYS8nGGPVWZK Ke+Q== X-Gm-Message-State: AMke39mWHnN+O+4cQ2UN8JUy+1XhCQ/P+ixovN6EMiZWFBJOenYs++s3WU0fq7dGkJZmeBvFdqfvtvAGVeWQ3Q== X-Received: by 10.36.19.133 with SMTP id 127mr2741667itz.3.1488290294126; Tue, 28 Feb 2017 05:58:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.146.10 with HTTP; Tue, 28 Feb 2017 05:58:13 -0800 (PST) In-Reply-To: References: Date: Tue, 28 Feb 2017 08:58:13 -0500 Message-ID: To: Andrea Faulds , Marco Pivetta , Christopher Jones Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a114633624de4000549979607 Subject: Re: [PHP-DEV] Re: [RFC] Extended String Types For PDO From: adam.baratz@gmail.com (Adam Baratz) --001a114633624de4000549979607 Content-Type: text/plain; charset=UTF-8 Merging responses here... Are PARAM_STR_UNICODE, ATTR_UNICODE_STRINGS and PARAM_STR_ASCII the most > appropriate names? Good point. Maybe instead: - PDO::PARAM_STR_NATL - PDO::ATTR_NATL_STRINGS - PDO::PARAM_STR_CHAR How does this interact with different character sets used for the > connection, if at all? I don't think that should matter. This is strictly a hint for the quote functions to put an "N" at the beginning of their output. DBAL maintainer here: before we introduce even more complexity into the PDO > stuff (which is already a maze), could a set of test cases be written, so > that stuff that is currently impossible to do without this RFC is > clearer/demonstrated? > The other RFC I mentioned included a similar solution to this problem. The PR I put together for that should make this clear enough: https://github.com/php/php-src/pull/2168 > I'm asking because we didn't get any bug reports about extended string > types for Doctrine DBAL, and adding new types just to workaround the > limitations of the usual suspects is shotgun surgery, and just more > complexity to handle. > I think of them more like flags, like PDO::PARAM_INPUT_OUTPUT, than standalone types. Since you apply with a bitwise-OR, the addition would be minimally invasive. And you wouldn't have to rewrite code if you switch drivers. The flags would simply be ignored. (remember that PDO for SQLServer is experimental, if not totally unusable) > I'm mainly interested in pdo_dblib, which is an officially maintained extension (I'm the maintainer). I assume you're referring to pdo_sqlsrv? More importantly, what about allowing arbitrary quote delimiters? https://livesql.oracle.com/apex/livesql/file/content_CIREYU9 > EA54EOKQ7LAMZKRF6P.html This functionality seems orthogonal to what I'm describing. It would be more appropriate to implement this as a driver-specific attribute for pdo_oci. But since that driver doesn't support emulated prepares, I'm not sure how much value it would have. Thanks, Adam --001a114633624de4000549979607--