Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCYpU-00042j-6c for pgsql-jdbc@arkaria.postgresql.org; Tue, 07 Jul 2015 19:46:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCYpT-0002FT-Nb for pgsql-jdbc@arkaria.postgresql.org; Tue, 07 Jul 2015 19:46:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCYpT-0002FN-5C for pgsql-jdbc@postgresql.org; Tue, 07 Jul 2015 19:46:55 +0000 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZCYpQ-0001a4-4w for pgsql-jdbc@postgresql.org; Tue, 07 Jul 2015 19:46:54 +0000 Received: by wiwl6 with SMTP id l6so324683348wiw.0 for ; Tue, 07 Jul 2015 12:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=YN42N9NilZJp4ubsrvG3/WWQOqvtCyATaxEHAgWisKk=; b=S8xtnmVgpr6XNo6ZVryyvrGV9+77FM22xjhIHvFV0swO3swfU7KrHMrFI9jXGtkRlB ZLNvd7FeStOFGm8Ba5jEkXRMJ8dT0+8T/RrBDSHLOz7G5rKKY74+CitDNtjqOTfAm79b h8CnUAKMrPAGYu7HTgM8rYl8jWeq7LTWsGrQocURZH7SycMQs3lnRfkO6K3idZXDt6fS 9SK9HE2Sj3U7fWBonfdak6qycyvJPvD/L7ZoKZuNw6+EdPzD/T+TzdbTxlU3DfiI7a5n NyJbPRE8M6Omxs+3ZMMgGsR7xjAB9AyPsvgOs+UDhLLHug6RnH5d5RRI7RXhPywYlPo2 Ya8g== X-Received: by 10.180.87.199 with SMTP id ba7mr70132499wib.81.1436298410702; Tue, 07 Jul 2015 12:46:50 -0700 (PDT) Received: from [192.168.1.110] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by mx.google.com with ESMTPSA id d7sm26045889wij.0.2015.07.07.12.46.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2015 12:46:49 -0700 (PDT) Message-ID: <559C2CA8.6000200@iki.fi> Date: Tue, 07 Jul 2015 22:46:48 +0300 From: Heikki Linnakangas Reply-To: hlinnaka@iki.fi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Kevin Wooten , Dave Cramer CC: List Subject: Re: PostgreSQL gaps wrt to java, and jdbc References: <80FEC5E5-DD36-46F4-A510-31E08415FBB1@me.com> In-Reply-To: <80FEC5E5-DD36-46F4-A510-31E08415FBB1@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 07/07/2015 09:31 PM, Kevin Wooten wrote: > == Binary type coercion == > The biggest impediment I’ve run into is the fact that PG will not > attempt coercion on binary types. If you specify a binary type in the > protocol, that’s the final word. A better system would be to have PG > perform the same coercion it does for text types and then send the > results back with coerced types, in binary; finally falling back to > text when binary cannot be produced. This would solve almost every > issue we have had to work around in the “ng” driver. Can you elaborate? I'm confused, because the server can produce binary output for any datatype that has binary output functions. That covers all built-in datatypes and all extension datatypes people use in practice. What I've imagined to be a problem, though, is that you have to either understand the binary representation of all datatypes in the client, or you have to request binary for only those datatypes you can handle. And to know which datatype a result set's column has, you have to Describe it before fetching the results, which adds an extra round-trip. So it would be handy if the driver could provide the server a list of datatypes that should be sent as binary, as a one-time operation at the beginning of the session for example, rather than indicating for each column in each query separately. - Heikki -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc