Re: Notes on implementing URI syntax for libpq

Поиск
Список
Период
Сортировка
Искать
От
Alexander Shulgin
Тема
Re: Notes on implementing URI syntax for libpq
Дата
Msg-id
1322477008-sup-8927@moon
Ответ на
Список
Дерево обсуждения
Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Michael Meskes <meskes@postgresql.org>
Re: Notes on implementing URI syntax for libpq Florian Weimer <fweimer@bfk.de>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Robert Haas <robertmhaas@gmail.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Robert Haas <robertmhaas@gmail.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Robert Haas <robertmhaas@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>
Re: Notes on implementing URI syntax for libpq Alvaro Herrera <alvherre@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>
Re: Notes on implementing URI syntax for libpq Daniel Farina <daniel@heroku.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Robert Haas <robertmhaas@gmail.com>
Re: Notes on implementing URI syntax for libpq Daniel Farina <daniel@heroku.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 Martijn van Oosterhout <kleptog@svana.org>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Alvaro Herrera <alvherre@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Peter Eisentraut <peter_e@gmx.net>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Alvaro Herrera <alvherre@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Greg Smith <greg@2ndQuadrant.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Florian Weimer <fweimer@bfk.de>
Re: Notes on implementing URI syntax for libpq Alvaro Herrera <alvherre@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Florian Weimer <fweimer@bfk.de>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Alvaro Herrera <alvherre@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Robert Haas <robertmhaas@gmail.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Peter Eisentraut <peter_e@gmx.net>
Re: Notes on implementing URI syntax for libpq Alexey Klyukin <alexk@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Robert Haas <robertmhaas@gmail.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Dmitriy Igrishin <dmitigr@gmail.com>
Re: Notes on implementing URI syntax for libpq Alexander Shulgin <ash@commandprompt.com>
Re: Notes on implementing URI syntax for libpq Dmitriy Igrishin <dmitigr@gmail.com>

Excerpts from Greg Smith's message of Mon Nov 28 10:08:42 +0200 2011:
> 
> On 11/24/2011 05:21 AM, Alvaro Herrera wrote:
> > A coworker also suggested using a different designator:
> >
> > postgresqli:///path/to/socket:5433/database
> > postgresqli://:5433/database
> 
> This is not unprecedented.  An example is how CUPS handles this problem 
> when connecting printers using URIs:  
> http://www.cups.org/documentation.php/network.html where you might see 
> this for the usual port:
> 
> lpd://ip-address-or-hostname/queue
> 
> And this for AppSocket AKA JetDirect:
> 
> socket://ip-address-or-hostname
> 
> I am certainly not going to defend printing setup with CUPS as a model 
> worth emulating, just noting the similarity here.  I think we'll save 
> miles of user headaches if there's only one designator.

I'm not a big fan of using different designator for local socket connections either, especially if they differ so little (the added 'i' might be too hard to spot, moreso if the displayed using proportional font.)  Not to mention that printers and compatibility don't go together that often, in my (probably way too limited) experience. ;-)

As it was suggested downthread, "postgresql://[:port]/[mydb]" should work perfectly for this purpose, since it's just a matter of allowing empty host/addr in the URI.  So, using the default port: "postgresql:///mydb" (notice the similarity with the local-filesystem URI scheme: "file:///")

Speaking of JDBC, the "postgresql:///mydb" notation may be abbreviated as "postgresql:mydb", which is not unreasonable to support in psql too.

--
Regards,
Alex

В списке pgsql-hackers по дате отправления
От: Yeb Havinga
Дата:
Сообщение: Re: patch for type privileges
От: Shigeru Hanada
Дата:
FAQ