pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ediven@edsiohio.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6657: Documentation bug for PQconnectdbParams
Date: Mon, 21 May 2012 19:51:17 -0400
Message-ID: <10105.1337644277@sss.pgh.pa.us> (raw)
In-Reply-To: <E1SWXuR-0003d2-5C@wrigleys.postgresql.org>
References: <E1SWXuR-0003d2-5C@wrigleys.postgresql.org>

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=672def62259354f28000e8cfb9...

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



view thread (2+ messages)

Message-ID: <10105.1337644277@sss.pgh.pa.us>
Permalink:  ../10105.1337644277@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10105.1337644277@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ediven@edsiohio.com
  Subject: Re: BUG #6657: Documentation bug for PQconnectdbParams
  In-Reply-To: <10105.1337644277@sss.pgh.pa.us>
  References: <E1SWXuR-0003d2-5C@wrigleys.postgresql.org> <10105.1337644277@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox