On Tue, Nov 26, 2013 at 8:32 PM, David E. Wheeler <da...@justatheory.com>wrote:

> On Nov 26, 2013, at 11:26 AM, Gisle Aas <gi...@activestate.com> wrote:
>
> > I do find the "db:" prefix ugly.  If you want users to see these strings
> I would think they find this prefix to be clutter too.
>
> Yeah. But I would thin, that if it *was* a standard, there would be just
> one scheme defined. That’s a guess, though. Maybe no one would care, and
> would not mind an unlimited number of new schemes (one for every db
> engine)? I don’t know.
>

There is also precedence for using "+" in scheme names.  Something like
"db+postgresql:" then.  It's still cluttered, and not really compatible
with what other have used.  Or "x-postgres:" while it's still experimental.
 Naming stuff is hard.


> > You seem to be alone in calling it "pg:".  For the other examples out
> there I see "postgresql:" or "postgres:".  Should all different ways be
> allowed and lead to the same thing?  I've seen both "mysql:" and "mysql2:".
> What about "mariadb:"?
>
> Yeah, I was going to add "postgres" and "postgresql" subclasses. Maybe
> "pgsql", too, I dunno. Never seen "mysql2"; what’s that?


I don't know.  Version 2 of the mysql protocol perhaps.  I saw it at
https://github.com/kennethreitz/dj-database-url/blob/master/dj_database_url.py#L17


> Maria is the same as MySQL, really; I should add it, though, and have it
> inherit from db:mysql, just as vertica currently inherits from db:pg.
>

The scheme really should just be named after the protocol, not the kind of
product you happen to find at the other end.

It would certainly be preferable if there was a single name for each
protocol.


> > For sqlite:-URLs people seem to disagree on how to specify relative vs
> absolute path names.
>
> Really? To me, an absolute path starts with "/". Anything else is relative.
>

Is sqlite:///path relative or absolute then?  What about sqlite:/path?

dj-database-url claims 4 slashes is the way to go; sqlite:////path

The ftp: standard had the same problem.  It was once specified that
ftp://server/%2Fpath was to be required to make the path absolute, while
ftp://server/path was supposed to be relative to the home directory you
ended up in after logging in to the ftp account.  This was very confusing
to users so most browers just implemented the path to always be absolute,
with no way to access relative paths. That's at least how I remembered it.

--Gisle

Reply via email to