On Thu, Nov 24, 2011 at 8:50 AM, Alexander Shulgin <a...@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 particular foreign 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 the docs 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers