Excerpts from Peter Eisentraut's message of vie abr 06 03:09:10 -0300 2012:
> On fre, 2012-04-06 at 00:25 -0300, Alvaro Herrera wrote:
> > Some moments of radical thinking later, I became unhappy with the fact
> > that the conninfo stuff and parameter keywords are all crammed in the
> > PQconnectdbParams description. This feels wrong to me, even more so
> > after we expand it even more to add URIs to the mix. I think it's
> > better to create a separate sect1 (which I've entitled "Connection
> > Strings") which explains the conninfo and URI formats as well as
> > accepted keywords. The new section is referenced from the multiple
> > places that need it, without having to point to PQconnectdbParams.
>
> Yes, it should be split out. But the libpq chapter already has too many
> tiny sect1s. I think it should be a sect2 under "Database Connection
> Control".
Thanks, that seems a good idea. I have tweaked things slightly and it
looks pretty decent to me. Wording improvements are welcome. The file
in its entirety can be seen here:
https://github.com/alvherre/postgres/blob/uri/doc/src/sgml/libpq.sgml
The new bits start at line 1224. I also attach the HTML output for easy
reading. (I wonder if it's going to be visible in the archives).
There are three minor things that need to be changed for this to be
committable:
1. it depends on strtok_r which is likely to be a problem in MSVC++ and
perhaps older Unix platforms as well.
2. The ssl=true trick being converted into sslmode=require doesn't work
if the URI specifies them uri-encoded, which seems bogus.
3. if an unknown keyword is uri-encoded, the error message displays it
still uri-encoded. Seems to me it'd be better to uri-decode it before
throwing error.
Alexander says he's going to work on these and then I'll finally commit it.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support