Re: Proposal to add a new URL data type. - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Proposal to add a new URL data type.
Date
Msg-id 5CDF62D7-64B5-469C-B446-0D11464F6767@yesql.se
Whole thread Raw
In response to Re: Proposal to add a new URL data type.  (Alexander Borisov <lex.borisov@gmail.com>)
Responses Re: Proposal to add a new URL data type.
Re: Proposal to add a new URL data type.
List pgsql-hackers
> On 6 Dec 2024, at 13:59, Alexander Borisov <lex.borisov@gmail.com> wrote:

> As I've written before, there is a difference between parsing URLs
> according to the RFC 3986 specification and WHATWG URLs.  This is
> especially true for host.  Here are a couple more examples.

As someone who wears another open-source hat which is heavily involved in
parsing URLs I cannot stress enough how much I think postgres should avoid
this.  The example url http://http://http://@http://http://?http://#http:// is
a valid url, but is rejected by a number of implementations and parsed
differently by most that accept it.

A URL datatype is a *good idea* but one which I personally believe is best
handled as an external extension.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Alexander Borisov
Date:
Subject: Re: Proposal to add a new URL data type.
Next
From: Alvaro Herrera
Date:
Subject: Re: Pass ParseState as down to utility functions.