Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68032 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60785 invoked from network); 2 Jul 2013 10:22:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2013 10:22:36 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.52 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.52 mail-qa0-f52.google.com Received: from [209.85.216.52] ([209.85.216.52:44118] helo=mail-qa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/71-49923-BE9A2D15 for ; Tue, 02 Jul 2013 06:22:36 -0400 Received: by mail-qa0-f52.google.com with SMTP id bv4so2681088qab.4 for ; Tue, 02 Jul 2013 03:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=BcsxufY/Wu+tdGQ2HPfZrE8fQsHhzwAykR6p05tcITE=; b=vpAqG7tQn9ztuvYwH1TGmv1T/vtYh4r+QH9Bf646Jl7wlEZyPjJ0EVsYJHCm+KkFjK PiPMUxmijdMLo2rRnTMnr2SFP7u3PUS2bnGF1aydYHb6ZzrFlFUY4Q8oFTsqRhqFUi0z U+hqgTTLdDVrr2BRbdbUPUrAK3yQhcuNb7eV2qDLQYaeS+2Ap4EO/duirccVISNFB3Nc m+C79B1/mz2/8s0aGNsiAKn1cApKSb5E2ysfzXaqVb8Y+N2s5uXaGfxgfDnq8u2AZFMU IgBGNkg+06qD+1DFMeQ3BsG0NS9EYp5t194MALevGgXbXoh48DHqPeGAjfNy/ilt9auv wlog== X-Received: by 10.49.117.195 with SMTP id kg3mr36781093qeb.68.1372760553203; Tue, 02 Jul 2013 03:22:33 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.224.116.207 with HTTP; Tue, 2 Jul 2013 03:21:53 -0700 (PDT) In-Reply-To: <51D29355.9040807@beccati.com> References: <51CAB115.60602@beccati.com> <51D29355.9040807@beccati.com> Date: Tue, 2 Jul 2013 19:21:53 +0900 X-Google-Sender-Auth: 58z_nai9pA6fU13WDLZgvlKOQIQ Message-ID: To: Matteo Beccati Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b5da46f22b03404e084b978 Subject: Re: [PHP-DEV] pgsql: Binary data support improvement From: yohgaki@ohgaki.net (Yasuo Ohgaki) --047d7b5da46f22b03404e084b978 Content-Type: text/plain; charset=ISO-8859-1 Hi Matteo, 2013/7/2 Matteo Beccati > > AFAIK, PDO doesn't handle bytea data natively. > > It does, as far as I remember. See PDO::PARAM_LOB > > We could easily (and transparently) use binary for the parameters > explicitly bound as LOB, but I see no way we can use binary for results > -- which usually is the most common operation. Maybe it's better than > nothing though? The API is not for ease of use, but for better performance as it eliminate needless hex conversions on both server and client side. > > > There may be clever usage, but binary support is only for faster bytea > > handling. > > API isn't great, so if there are objections, I'll spend time rather than > > this. > > I think the API would become cumbersome and error-prone, although I see > the benefits in bytea-intensive scenarios. > Right. My vote is: +0 > > If we only could figure out a better API, that could turn into a +1... Since libpq does not support API that selectively return binary type, there won't be any better API. We may wait until PostgreSQL supports better API. There may be better API in the future. I'll close applicable bug reports as "won't fix". Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --047d7b5da46f22b03404e084b978--