BUG #10014: Does not work PQfn in libpq with array - Mailing list pgsql-bugs

From aleksey.vitaliev@transas.com
Subject BUG #10014: Does not work PQfn in libpq with array
Date
Msg-id 20140414084248.15390.12810@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #10014: Does not work PQfn in libpq with array  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-bugs
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<int*> ( 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;

pgsql-bugs by date:

Previous
From: kona ajay
Date:
Subject: Fwd: cant insert into a post gre sql table...Can u please help in fixing this
Next
From: kona ajay
Date:
Subject: cant insert into a postgre sql table from c# please help to solve this......... |Thanks very much in advance