Re: Notes on implementing URI syntax for libpq

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Notes on implementing URI syntax for libpq
Дата
Msg-id CA+Tgmoa7cZJJgCVwJYv8WxR8TTK-HAty5LP3XvbwAQ1dmHJ88A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Notes on implementing URI syntax for libpq  (Alexander Shulgin <ash@commandprompt.com>)
Ответы Re: Notes on implementing URI syntax for libpq  (Alexander Shulgin <ash@commandprompt.com>)
Re: Notes on implementing URI syntax for libpq  (Alexander Shulgin <ash@commandprompt.com>)
Список pgsql-hackers
On Thu, Nov 24, 2011 at 8:50 AM, Alexander Shulgin
<ash@commandprompt.com> wrote:
> What JDBC supports is rather weird and far from being ideal:
http://jdbc.postgresql.org/documentation/head/connect.html
>
> The problem with supporting multiple syntaxes, IMO is that it makes libpq compatible in only one direction: from
particularforeign syntax to libpq, but not from libqp to any other particular foreign syntax.  So when you see psql -d
<URL>you wouldn't know if you can copy that URL to JDBC or any other connection interface parameter, unless you check
thedocs thoroughly. 

Well, based on that document, I think that trying to be bug-compatible
with the JDBC syntax is a, erm, doomed effort.  I mean, what are you
going to do with things like loglevel or logUnclosedConnections that
change the behavior of JDBC, not PostgreSQL?

I think we could do something like:

postgresql://user:pw@host:port/database?param1=val1¶m2=val2¶m3=val3&...

...where the param and val bits are standard libpq connection
parameters.  And for compatibility you could allow "user" and
"password" to be specified as connection parameters rather than
included in the host portion of the string.  But you're still not
going to be 100% compatible with JDBC, because we're not going support
unknownLenghth=42 in libpq just because JDBC has chosen to implement
some weirdness in that area.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Making TEXT NUL-transparent
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: bug of recovery?