Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id CA702A684E2 for ; Mon, 21 May 2012 20:51:36 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SWcNw-00037y-0F for pgsql-bugs@postgresql.org; Mon, 21 May 2012 23:51:35 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q4LNpHQO010106; Mon, 21 May 2012 19:51:18 -0400 (EDT) To: ediven@edsiohio.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6657: Documentation bug for PQconnectdbParams In-reply-to: References: Comments: In-reply-to ediven@edsiohio.com message dated "Mon, 21 May 2012 19:04:47 -0000" Date: Mon, 21 May 2012 19:51:17 -0400 Message-ID: <10105.1337644277@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/133 X-Sequence-Number: 33104 ediven@edsiohio.com writes: > PostgreSQL version: 9.0.2 > ... > That said, I would humbly suggest that the documentation for the > PQconnectdbParams function omits certain details. Notably, the function > will return NULL if you pass in a keywords array with an unrecognized > keyword. This is a known bug that was fixed in 9.0.4. When I try it now, I get a PGconn object back, with status CONNECTION_BAD, and PQerrorMessage returns invalid connection option "host_addr" which was the intended behavior all along, but there was a typo in 9.0; see http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=672def62259354f28000e8cfb97b6668192369c2 In theory at least, you should only get a NULL back if there's insufficient memory to create a PGconn object at all. regards, tom lane