Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YEOLD-0007iw-GB for pgsql-odbc@arkaria.postgresql.org; Thu, 22 Jan 2015 20:26:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YEOLD-0003gT-07 for pgsql-odbc@arkaria.postgresql.org; Thu, 22 Jan 2015 20:26:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YEBaj-0001a9-AA for pgsql-odbc@postgresql.org; Thu, 22 Jan 2015 06:50:09 +0000 Received: from pgfoundry.org ([200.46.204.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YEBaf-000581-Kz for pgsql-odbc@postgresql.org; Thu, 22 Jan 2015 06:50:07 +0000 Received: from localhost (mx3.hub.org [200.46.204.151]) by pgfoundry.org (Postfix) with ESMTP id 72C29A3E435 for ; Thu, 22 Jan 2015 06:50:01 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (maia.hub.org [200.46.204.151]) (maiad, port 10024) with ESMTP id 14074-06; Thu, 22 Jan 2015 02:49:57 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id 95B63A3E432; Thu, 22 Jan 2015 06:49:56 +0000 (UTC) Reply-to: psqlodbc-bugs@pgfoundry.org To: noreply@pgfoundry.org From: Subject: [psqlodbc-Bugs][1011196] Cannot insert very large blobs Content-type: text/plain; charset=UTF-8 Message-Id: <20150122064956.95B63A3E432@pgfoundry.org> Date: Thu, 22 Jan 2015 06:49:56 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.3 X-Spam-Status: No, hits=-1.901 tagged_above=-5 required=4.9 tests=BAYES_00=-1.9, NO_RELAYS=-0.001 X-Spam-Level: X-Pg-Spam-Score: -6.9 (------) 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 psqlodbc-Bugs item #1011196, was changed at 2015-01-22 08:49 by Heikki Linnakangas You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1011196&group_id=1000125 Or by replying to this e-mail entering your response between the following markers: #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ (enter your response here, only in plain text format) #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ >Status: Closed Priority: 3 Submitted By: Michael Vitale (pgdude) Assigned to: Nobody (None) Summary: Cannot insert very large blobs Category: None Group: None Resolution: None Category: None Group: None >Resolution: None Initial Comment: I can use the PostgreSQL ODBC driver to insert a blob (bytea) of 128 megabytes, but when I try to insert one that is 399 megabytes it fails with: Query buffer overflow in copy_statement_with_parameters The actuall call that fails is SQLExecute. Here is the snippet of code I see in convert.c: enlarge_query_statement(QueryBuild *qb, size_t newsize) { size_t newalsize = INIT_MIN_ALLOC; CSTR func = "enlarge_statement"; if (qb->str_size_limit > 0 && qb->str_size_limit < (int) newsize) { < here is the branch that is executed> ---------------------------------------------------------------------- >Comment By: Heikki Linnakangas (hlinnaka) Date: 2015-01-22 08:49 Message: I don't know what went wrong here, but that piece of code has been removed from git master, so that shouldn't happen anymore.. ---------------------------------------------------------------------- Comment By: Michael Vitale (pgdude) Date: 2012-05-22 01:13 Message: [4272-42.487]SQL_VARBINARY: about to call convert_to_pgbinary, used = 399966009 [4272-42.488]STATEMENT ERROR: func=enlarge_statement, desc='', errnum=1, errmsg='Query buffer allocate error in copy_statement_with_parameters' [4272-42.496]CONN ERROR: func=enlarge_statement, desc='', errnum=0, errmsg='(NULL)' [4272-42.499]retval=-1 [4272-42.500][[SQLGetDiagFieldW]] Handle=(3,08F47DD0) Rec=1 Id=4 info=(09BF6788,12) [4272-42.500]PGAPI_GetDiagField entering rec=1[4272-42.500]ER_ReturnError: status = 1, msg = #Query buffer allocate error in copy_statement_with_parameters# [4272-42.501] szSqlState = 'HY000',len=61, szError='(null)' [4272-42.501]PGAPI_GetDiagField exiting 0 [4272-42.502][[SQLGetDiagFieldW]] Handle=(3,08F47DD0) Rec=2 Id=4 info=(09BF6788,12) [4272-42.502]PGAPI_GetDiagField entering rec=2[4272-42.502]ER_ReturnError: status = ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1011196&group_id=1000125 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc