Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aKvZq-0005FM-JT for pgsql-sql@arkaria.postgresql.org; Sun, 17 Jan 2016 22:13:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aKvZq-0001dQ-5r for pgsql-sql@arkaria.postgresql.org; Sun, 17 Jan 2016 22:13:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aKvZp-0001dJ-Kj for pgsql-sql@postgresql.org; Sun, 17 Jan 2016 22:13:37 +0000 Received: from plane.gmane.org ([80.91.229.3]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aKvZm-0000dg-7a for pgsql-sql@postgresql.org; Sun, 17 Jan 2016 22:13:36 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aKvZf-0003cH-RX for pgsql-sql@postgresql.org; Sun, 17 Jan 2016 23:13:27 +0100 Received: from ppp-46-244-198-74.dynamic.mnet-online.de ([46.244.198.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2016 23:13:27 +0100 Received: from spam_eater by ppp-46-244-198-74.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2016 23:13:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Thomas Kellerer Subject: Re: BYTEA Date: Sun, 17 Jan 2016 23:13:09 +0100 Lines: 18 Message-ID: References: <569BF994.1060909@aklaver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-46-244-198-74.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Andreas Joseph Krogh schrieb am 17.01.2016 um 23:09: > > Do I really *Need to escape/encode binary data before sending to DB > > then do the reverse after retrieving the data?* > > * > > * > > If so, what (*Java*) codes should I use to achieve this goal (I am using > > the Java to interface with the DB)? > > https://jdbc.postgresql.org/documentation/94/binary-data.html > > Save yourself the trouble and don't go this route. Use https://github.com/impossibl/pgjdbc-ng instead. Can you elaborate? Using the "official" JDBC driver with bytea column works just fine for me. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql