Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105813 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50679 invoked from network); 31 May 2019 19:09:13 -0000 Received: from unknown (HELO mail-it1-f172.google.com) (209.85.166.172) by pb1.pair.com with SMTP; 31 May 2019 19:09:13 -0000 Received: by mail-it1-f172.google.com with SMTP id g24so3521271iti.5 for ; Fri, 31 May 2019 09:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=tfuCyzWpKrrYjAkT9Odv0nqJrcU1G5tjxcf43MxzBd0=; b=G485lgwPtMJ9DJOq8vOBctsSZ3p3+z+J6976GFSAKZIeLE2nhBk2aAi0UA4Ax3wbkJ dWoH5jV7hUGNZ2gfu7qbge+SuVty0/MN5GsFp3SOHTb+T3L35MzXlq/gfNhXcHSKzyLP kVZHM4AJ9oLSSvZoLfgJb3moSZp9eO9BEE0v0LGoFU+vAoWMHK2Ro3ipp12VEbU8Gqip jq1jvf7iHDGa45qPBq4HdSo0g7L9QQcgALvtPcSwkg6hV0sfqR2dOxPqkVZS0Hw0SdJ/ gub/60nShIhlXPNgG+PnWYT6sy+5jUUOtnoAGmO8cevrYmiQMAZmzmIwb8bUjaKetDFH txVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=tfuCyzWpKrrYjAkT9Odv0nqJrcU1G5tjxcf43MxzBd0=; b=subSDXWD64TYhLoqlnxuuLF8itXwXeSAn23lvDYf/saT+5QcoYtsPfOgdyI/gZCxor b/MRVKUhDvsXjRI74q3WL1TVgUQ5us41L/y2dh+rjmjiRTS9Wlo/1/t3SZP+Eaaa30A3 o2+7nlE5V6aMkESswjeCuqZd1+mlDZsKrTMVs8q+RJEUB9Wpvast+rfHBZPRqbBQw/TH iM+2sx/6EA51lhaAbcE1zaGezTyhakgiTIAarA1uSLAdFpsm8lkKRrOrBz9Cxq7+eEe0 1vtNQh5hsK1H6MEj/BGr7BAMldDplpnU2CRnEVsHN6KkpiUunI55hvxC2x6j4uxexdF1 S/Uw== X-Gm-Message-State: APjAAAVxwf+bjZvW3mMrLLponoFuuE9tzHn7jmWIlT/24/mw4DhuxiNl TZ8te+QVuNKFnPpZ14ARtqEKyE5rgFY7K3fSZ782tb02w0o= X-Google-Smtp-Source: APXvYqzp7dSaLpI0a7AYKMWmk+ADesYCZ9faAx6PlGWxtYIINTE/gaz8tc1vzvD2cHTOei281vx7lfsN/+4I5gW/sC4= X-Received: by 2002:a24:520f:: with SMTP id d15mr8269191itb.78.1559319548253; Fri, 31 May 2019 09:19:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 31 May 2019 17:18:56 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000c3dd58058a315ff6" Subject: Re: [PHP-DEV] [RFC] Escape PDO "?" parameter placeholder From: rowan.collins@gmail.com (Rowan Collins) --000000000000c3dd58058a315ff6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 31 May 2019 at 12:27, Matteo Beccati wrote: > Hi everyone, > > following some recent unrest in the comments of the related PR, I've > decided to invest a bit of time on it and finally move it to draft status= : > > https://wiki.php.net/rfc/pdo_escape_placeholders > Hi Matteo, This sounds like a very useful change. As you say in the RFC, these operators are going to be more and more common for Postgres users now that they've been defined for JSON types, and users of most other DBMSes will be completely unaffected. I wonder if there's any way we can gauge the BC impact, specifically this case: > The only exception to that is that Postgres (and possibly other RDMSs) allows the creation of custom operators: anyone having a custom =E2=80=9C??= =E2=80=9D operator in use would need to escape it as =E2=80=9C????=E2=80=9D. - Are there any standard or public Postgres extensions that define a "??" operator? e.g. anything published on https://pgxn.org/ - Are there any other databases supported by PDO that allow custom operators, or which might have a "??" operator or syntax token? If there is a risk of this affecting a reasonable number of people, we could add a deprecation notice on encountering "??" in any SQL string in 7.4, and postpone adding the escaping mechanism until 8.0. One other thing worth clarifying is the precise circumstances where ?? will be treated as an escape. Is it only when it's a separate "word" (start/end of string or surrounded by whitespace)? For instance, would "A ??=3D B" be "unescaped" to "A ?=3D B" or passed through as is? Note that this changes t= he scope of the BC break, as well as the usability of the chosen syntax, as both "?=3D" and "??=3D" could be defined as operators. Regards, --=20 Rowan Collins [IMSoP] --000000000000c3dd58058a315ff6--