Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WEGiv-0005cK-Vd for pgsql-jdbc@arkaria.postgresql.org; Fri, 14 Feb 2014 11:14:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WEGiv-0004EW-E3 for pgsql-jdbc@arkaria.postgresql.org; Fri, 14 Feb 2014 11:14:25 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WEGit-0004Cp-Q4 for pgsql-jdbc@postgresql.org; Fri, 14 Feb 2014 11:14:23 +0000 Received: from mx3.focusmr.com ([188.118.217.7] helo=mail.focusmr.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WEGiq-0003oi-Lz for pgsql-jdbc@postgresql.org; Fri, 14 Feb 2014 11:14:23 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.focusmr.com (Postfix) with ESMTP id E921E208E5A4 for ; Fri, 14 Feb 2014 12:14:18 +0100 (CET) Received: from mail.focusmr.com ([127.0.0.1]) by localhost (mx3.focusmr.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id nYMX1I3CBS8q for ; Fri, 14 Feb 2014 12:14:18 +0100 (CET) Received: from mail.focusmr.com (localhost [127.0.0.1]) by mail.focusmr.com (Postfix) with ESMTP id 98DC2208E5A6 for ; Fri, 14 Feb 2014 12:14:18 +0100 (CET) Received: from [172.26.131.40] (gw02.focusmr.com [213.235.233.85]) (Authenticated sender: d.selinger@focusmr.com) by mail.focusmr.com (Postfix) with ESMTPA id 934F0208E5A4 for ; Fri, 14 Feb 2014 12:14:18 +0100 (CET) Message-ID: <52FDFA8A.8040707@focusmr.com> Date: Fri, 14 Feb 2014 12:14:18 +0100 From: Daniel Selinger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: createArrayOf("bytea", Array) problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.1 (/) 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 Hi all, I have a problem with submitting arrays of bytea to the database via native jdbc arrays. i'm trying to do the following: List hashes = new ArrayList<>(); //add some SHA256 in form of byte[] srcPst = srcConnection.prepareStatement("select array_dims(?)"); srcPst.setArray(1, srcConnection.createArrayOf("bytea", hashes.toArray())); srcRs = srcPst.executeQuery(); srcRs.next(); srcRs.getString(1); --> "[1:5][1:32]" if i do the same thing on the database: select array_dims(array_agg(hashcolumn)) from hashtable; (hashcolumn is of type bytea(32)) --> "[1:5]" now im struggling how to use the bound data from jdbc on the database, because when i use the "[1:5][1:32]" array on the database for something like select * from hashtable where hashcolumn = ANY(?), i get no results, although i retrieved the hashes from a resultset on exaclty this table with getBytes("hashcolumn") any suggestions or hints on what i might doing wrong? -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc