X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B9D823A5398 for ; Sun, 9 Jan 2005 04:19:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89760-10 for ; Sun, 9 Jan 2005 04:19:08 +0000 (GMT) Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7A8C73A539E for ; Sun, 9 Jan 2005 04:19:07 +0000 (GMT) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CnUXh-0002Ij-00 for ; Sun, 09 Jan 2005 05:19:05 +0100 Received: from p5484b213.dip.t-dialin.net ([84.132.178.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Jan 2005 05:19:05 +0100 Received: from skoehler by p5484b213.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Jan 2005 05:19:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: =?ISO-8859-1?Q?Sven_K=F6hler?= Subject: Re: BLOBs etc Date: Sun, 09 Jan 2005 05:21:00 +0100 Lines: 24 Message-ID: References: <41DDFC46.1080807@upb.de> <41DE0680.4030103@upb.de> <41DE0D9B.7050104@upb.de> <41DE1C70.604@upb.de> <41DE425C.9090601@mailblocks.com> <41DEBEEA.9050006@mailblocks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p5484b213.dip.t-dialin.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040927 X-Accept-Language: de, en In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/65 X-Sequence-Number: 11945 >> I'm not clear what your advocating in concrete terms. A new pseudo >> type "binary data" that could be used until it needs to convert it >> into a concrete type? When does this conversion have to happen? > > Couldn't this be limited to the client/server protocol? There are 4 > cases that will fail today. If you attempt to: > > 1. stream lob data from the client for storage in a bytea. > 2. send a bytea data "by value" for storage in a LOB. > 3. read LOB data that is passed as a bytea. > 4. read bytea data that is really a LOB. > > As you pointed out earlier, it should be possible to make the client > handle cases #3 and #4 so what's left for the server is to deal with #1 > and #2. That doesn't sound like rocket science to me. I see that i'm not alone :-) I would already be satisfied, if case #2 would be handled by the server, and #4 would be handled by the client. That would make the LOB ths most compatible datatype. The difference between bytea and LOBs may be a bit confusing sometimes, but well, i don't see a problem with semantics. The way to access the binary data (with autocommit on or off) is a forced by the column's datatype, and not by the Java-method which is called.