Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WZknH-00036q-8q for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Apr 2014 17:35:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WZknG-0004d8-G7 for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Apr 2014 17:35:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WZcTt-0004Eb-So for pgsql-bugs@postgresql.org; Mon, 14 Apr 2014 08:43:09 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WZcTm-00048m-Np for pgsql-bugs@postgresql.org; Mon, 14 Apr 2014 08:43:09 +0000 MIME-Version: 1.0 Subject: BUG #10014: Does not work PQfn in libpq with array To: pgsql-bugs@postgresql.org From: aleksey.vitaliev@transas.com Date: Mon, 14 Apr 2014 08:42:48 +0000 Message-ID: <20140414084248.15390.12810@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 10014 Logged by: Vitalyev Aleksey Email address: aleksey.vitaliev@transas.com PostgreSQL version: 9.2.4 Operating system: Windows 7 Description: I have a store procedure __a(INT[] args). I try execute this procedure with libpq and call PQfn function. How should I transmit array of int from c++ code? I get only this message "number of array dimensions (16777216) exceeds the maximum allowed (6)" This is my code: int result_buf = 0; int result_len = 0; int result_is_int = 0; PQArgBlock args[1]; int iFrom[] = {1,2}; args[0].len = sizeof(iFrom) * 2; args[0].isint = 0; args[0].u.ptr = reinterpret_cast ( iFrom ); PGresult* res = PQfn( m_conn, 1447769, &result_buf, &result_len, result_is_int, args, 1 ); if ( PQresultStatus(res) != PGRES_COMMAND_OK ) { ::OutputDebugStringA( m_stringUtil.FormatEx("ExecFunc failed!\n%s\n", PQresultErrorMessage(res)) ); ReleaseResult( res ); return false; } ReleaseResult( res ); return true; This is store procedure: CREATE OR REPLACE FUNCTION ___a(oldUniqId INT[]) RETURNS BOOLEAN AS $$ BEGIN RETURN TRUE; END $$ LANGUAGE plpgsql VOLATILE STRICT; ALTER FUNCTION ___a(INT[]) OWNER TO postgres; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs