X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6A96052851 for ; Sat, 4 Jun 2005 10:36:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48594-04 for ; Sat, 4 Jun 2005 13:36:26 +0000 (GMT) Received: from brasil.brainstorm.fr (brasil.brainstorm.fr [193.56.58.33]) by svr1.postgresql.org (Postfix) with ESMTP id 0CE4252838 for ; Sat, 4 Jun 2005 10:36:22 -0300 (ADT) Received: by brasil.brainstorm.fr (Postfix, from userid 1005) id 1CE0126AE95; Sat, 4 Jun 2005 15:36:26 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: Manitou v0.9.6 From: "Daniel Verite" Subject: Re: libpq, PQExecParams and the inserting of binary data To: pgsql-interfaces@postgresql.org In-Reply-To: <7104a73705060401222c6cc5d2@mail.gmail.com> Date: Sat, 04 Jun 2005 15:36:20 +0200 Message-Id: <20050604153734.8397528@uruguay> X-Face: 0N#]; "Miw2ss`WySq(ZLLy[=.ai4D}yI#'n*PU:{%/ZVSUd*G$EuN$v@TyBnpW5x=-m*Jc?Cm&=kXN#l; pePLb!,P.9D4M]fHU+XMPTe(>>'( X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.019 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/20 X-Sequence-Number: 5588 Volkan YAZICI wrote: > res = PQexecParams(conn, command, nParams, paramTypes, paramValues, > paramLengths, paramFormats, resultFormat); [...] > Above code is working well for me. But while trying some other > combinations (out of NULL usage) for PQexecParams parameters, I > realized that when we use "const int paramFormats[] = {1};" execution > dumps SegFault: Are you passing a NULL pointer in paramLengths? You need to pass an array containing the actual length of your binary data. -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org