Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100814 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56681 invoked from network); 3 Oct 2017 14:22:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2017 14:22:24 -0000 Authentication-Results: pb1.pair.com header.from=adambaratz@php.net; sender-id=unknown 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.216.176 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.216.176 mail-qt0-f176.google.com Received: from [209.85.216.176] ([209.85.216.176:54010] helo=mail-qt0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/21-34435-E1D93D95 for ; Tue, 03 Oct 2017 10:22:22 -0400 Received: by mail-qt0-f176.google.com with SMTP id 47so13200903qts.10 for ; Tue, 03 Oct 2017 07:22:22 -0700 (PDT) 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=301vpCY2D66GC7VTmaDcQW8HjxCXSZqAhH5Y0I3V58g=; b=k/bUD2ebjSz1MBlsIpRQA0FTFZ1R1fOxC+fJe+81dtjKVBJJM8WGCO98T/PjzHRKOU ucmoswek7zLQ1uTqiI+srp1goNaCrzzvugBV9Y6oHv2gSAPW8ZeXHAUzBWKM5mJSe7Gj QEpnGuH/xMd++ejH8SKtCP9gUZWJELrCs2xYpsJvLZ+JOmDFojOehP1ZBEXVLcZ/zv8I 0NsJeI9gp6IwRigpvnZrodpg+5HMDdoq9ygwg1FQgB0g2C2sB9WBkGxjsaBTjTw4jkDN oJXaIehnbXlRu00yhzpqXFjhoqGylvp7fubYXLoJoiC2LPWUqnce2N+A8Ca4bjz6Rtw+ R5uA== X-Gm-Message-State: AMCzsaW+fCm91QJOxLJ/isnBQsv8TPvwUYlvuT0e5JKLbcXMo0NLS/FY veqoc9VuYkkYi1jObmWiilvJGEko X-Received: by 10.237.58.7 with SMTP id n7mr24484834qte.205.1507040539340; Tue, 03 Oct 2017 07:22:19 -0700 (PDT) Received: from mail-qt0-f173.google.com (mail-qt0-f173.google.com. [209.85.216.173]) by smtp.gmail.com with ESMTPSA id s90sm436186qkl.94.2017.10.03.07.22.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Oct 2017 07:22:19 -0700 (PDT) Received: by mail-qt0-f173.google.com with SMTP id k1so2244436qti.2 for ; Tue, 03 Oct 2017 07:22:18 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA4hZfQLhzBgAAosWt2Xi2y5m24WO6MNOJilLM2prcXKJ0Bay1cFwNeJJC9V2XIT8c9yriTR0F9z96ooGmzgJ0= X-Received: by 10.200.15.132 with SMTP id b4mr15130937qtk.127.1507040538492; Tue, 03 Oct 2017 07:22:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.177.11 with HTTP; Tue, 3 Oct 2017 07:22:17 -0700 (PDT) In-Reply-To: References: <25903b1e0fc5a726e44b1e3a5ab4aec4@bohwaz.net> <0607d622-caa9-ae1d-33db-1958a0ff0500@gmx.de> <20171001185540.5e572e58@platypus> Date: Tue, 3 Oct 2017 14:22:17 +0000 X-Gmail-Original-Message-ID: Message-ID: To: "BohwaZ/PHP" Cc: "Christoph M. Becker" , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="94eb2c035748f585c3055aa5377b" Subject: Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO From: adambaratz@php.net (Adam Baratz) --94eb2c035748f585c3055aa5377b Content-Type: text/plain; charset="UTF-8" > > PDO already has support for large objects (LOBs)[1]. I don't know if >>> and how these are supported by the pdo_sqlite driver, but wouldn't it >>> make sense to use the existing API instead of introducing a new >>> method? >>> >>> [1] >>> >>> >> Very interesting indeed, didn't know about that feature, I was >> expecting the creation of a new method was the only way, as this was >> the way PGSQL was doing it. >> >> There's even a bug report about it: >> https://bugs.php.net/bug.php?id=57691 >> >> I will look into that next week and see if it can fit and replace my RFC >> then. >> > > > OK, I took some time to look into that feature and the fact is that it > doesn't work at all currently with SQLite, it is not returning a resource > handle but a string, and it is consuming a large amount of memory as it is > just dumping the LOB in memory. The code seems to be there to handle it > though so I don't know what's going on, if the person who implemented that > could come forward and tell me more about the implementation. I believe that's how PDO::PARAM_LOB is intended to work (based on my reading of the docs and implementations for other drivers). It seems like more of a convenience than anything, though maybe someone had more ideas for how it should work across drivers and never got to follow through on it. The RFC is agreeable to me because it follows the existing ext/sqlite3 API and uses the existing pattern in pdo_sqlite for integrating driver-specific APIs. I'd love it if PDO had better BLOB/LOB types and if we had a better pattern for driver-specific APIs, but I'm comfortable lumping those goals under "future scope." Getting parity with ext/sqlite3 will make pdo_sqlite more usable, which will help grow its community, and the number of people who are able to contribute to these bigger projects. Deprecating the current set of driver-specific APIs in the future, if we have functional equivalents, isn't an impossible project. Thanks, Adam --94eb2c035748f585c3055aa5377b--