Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9D1x-000085-9r for pgsql-interfaces@arkaria.postgresql.org; Sat, 23 Feb 2013 11:12:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U9D1w-0005Yc-M0 for pgsql-interfaces@arkaria.postgresql.org; Sat, 23 Feb 2013 11:12:36 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9D1v-0005YW-Pm for pgsql-interfaces@postgresql.org; Sat, 23 Feb 2013 11:12:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9D1u-00047f-Rs for pgsql-interfaces@postgresql.org; Sat, 23 Feb 2013 11:12:35 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r1NBCXgb025585; Sat, 23 Feb 2013 06:12:33 -0500 (EST) From: Tom Lane To: Andrei Petru Mura cc: pgsql-interfaces@postgresql.org Subject: Re: Issue on calling PQconnectdbParams from C In-reply-to: References: Comments: In-reply-to Andrei Petru Mura message dated "Sat, 23 Feb 2013 11:42:36 +0200" Date: Sat, 23 Feb 2013 06:12:33 -0500 Message-ID: <25584.1361617953@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org Andrei Petru Mura writes: > I'm trying to create a database connection with libpq from C. If I create > the same connection with PQconnectdb, everything works fine, but if I > create it with PQconnectdbParams function, I get a segmentation fault > message, without any other message. Can anybody help me in that issue? Presumably you constructed the arguments for PQconnectdbParams incorrectly (ie, with a incorrect pointer somewhere) ... but without seeing your code it's hard to be any more specific than that. regards, tom lane -- Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces