Re: [pgsql-www] Excessive # usage in URLs

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [pgsql-www] Excessive # usage in URLs
Дата
Msg-id CABUevEwH4PwbOJq6z0kX+0Qxw+mV1Bhwfh1zFgs8DRmVMfnytw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Excessive # usage in URLs  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: [pgsql-www] Excessive # usage in URLs  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-www


On Fri, Oct 23, 2015 at 5:28 PM, Magnus Hagander <magnus@hagander.net> wrote:


On Fri, Oct 23, 2015 at 5:26 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Stephen Frost wrote:
> * Magnus Hagander (magnus@hagander.net) wrote:
> > The point of the # is that you actually want to point to that specific
> > message in the thread. If you just pick the first message in the thread we
> > could exclude it, but how else would you link to a specific message?
>
> The request isn't to remove the "#" ability for the flat view entirely,
> it'd just be nice if the site didn't redirect to having the "#" when the
> message-id after the "#" is the same as the one before the "#" (iow,
> it's the first message).

Here's another idea.  Right now the <A NAME="tag"> tag is the
message-id, but since messages are added consecutively to a thread, we
could just assign each of them a number, so that to link the second
message in a thread we could do this

http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net#2
We could do this in addition to the message-id-based NAME tag.

True. We could also use the surrogate key we have in the db.

In fact, we could have a <a name> for each of those two, so that one could still use the other one if building URLs elsewhere, but the ones generated in the archives could use the shorter id. That's a number that goes up to max 6 digits at this point (and that would actually  be guaranteed to be stable in the future, unlike just using the sequential)


So, do I win anything for best zombie thread back from the dead today?

It's only been a few years, so I've now actually done this in the shape of two tiny commits and I think totaling 11 lines :)

Basically, now:
* If you navigate to the first message in a thread, no redirect at all is done
* If you navigate to another message, there is a redirect to the # url but using the md5 of the messageid keeping a lot shorter than your average gmail messageid

Well, that's actually more than 4 lines of code per year, you can't expect coding much faster than that!

FWIW, I haven't purged caches so it will gradually start showing up on threads in the archives as time go by.

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Improve description of pgsql-admin list, too much pgAdmin traffic
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [pgsql-www] Excessive # usage in URLs