Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aB1fw-0001N6-6U for pgsql-odbc@arkaria.postgresql.org; Mon, 21 Dec 2015 14:43:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aB1fv-00016O-L3 for pgsql-odbc@arkaria.postgresql.org; Mon, 21 Dec 2015 14:42:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aB1fX-0008SY-LG for pgsql-odbc@postgresql.org; Mon, 21 Dec 2015 14:42:35 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aB1fU-0002Bc-UM for pgsql-odbc@postgresql.org; Mon, 21 Dec 2015 14:42:35 +0000 Received: by mail-pf0-x22d.google.com with SMTP id n128so73075255pfn.0 for ; Mon, 21 Dec 2015 06:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=BhGoO+3CWxA61lvTk/1HWR0l3eSSqzzOOYD0XW2U3Ys=; b=mZdIxtFdH7zenlg8XyIVwjEQ5WMkFmv8iXMoDeiZZRo3mHSHrPZva+0xy2tDbqQGLo uSbyTS1/vW9R7ObClRr9EMqYnk/1mzcEsS/JdCE71eJvmdWfmYEHQsXbIhKWO6RnHrxI Ub3dovWPpNqVoIyUL5AWrV9yscnP5aeEWE/FKVw9IXmNt3lW5wKjBuoS9Acg2n+8LzGo KS3i8wIZQ3WN6plGYisgpc4kJFCP1WX3Rja/KGvgmb/SSxg/1l+1T+lL+ib7SRTa+v1p TYgKVlRdzKDEemfa+i6eslc+/4lMjvVWjyVt7YTCrXCK7oPE+fyPA13qpDL0jF28C1X1 hhNw== X-Received: by 10.98.73.75 with SMTP id w72mr27685667pfa.161.1450708950924; Mon, 21 Dec 2015 06:42:30 -0800 (PST) Received: from [192.168.1.115] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id f89sm35296795pfd.10.2015.12.21.06.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Dec 2015 06:42:30 -0800 (PST) Subject: Re: Error in calling a function with protocol 7.4 To: Haribabu Kommi , pgsql-odbc@postgresql.org References: From: Heikki Linnakangas Message-ID: <56780FB6.4000204@iki.fi> Date: Mon, 21 Dec 2015 16:41:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 09/12/15 02:40, Haribabu Kommi wrote: > when function is called using the following way, it generates an error. > > ? = CALL procname () > > The error message with 09.03.0400 with protocol 7.4 is > ----------------------------------------------------- > errstate -> 08P01 > errcode -> 7 > errmsg -> ERROR: invalid message format; Error while executing the query > ----------------------------------------------------- > > But it passes with protocol 6.4 in version 09.03.0400. The same test passes > with either protocol versions in version 09.03.0100. > > Function: > > CREATE OR REPLACE FUNCTION PROC1() RETURNS INTEGER > AS $$ > BEGIN > RETURN 1234; > END; > $$ LANGUAGE 'plpgsql'; > > Here I attached the sample test file to reproduce the problem. I want to know > whether is it a problem or normal behavior in this version? It's a bug. I bisected it into commit e6d7ded, which was a bit surprising because that commit didn't change the way the parameters are handled, AFAICS. In any case, in 'master', the bug was quite clearly in libpq_bind_and_exec(): with a not-already-prepared statement, it sent the original number of parameters to the server, rather than the number of parameters minus the OUT params. Pushed a fix for this to master. Thanks for the test case! - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc