Re: why two dashes in extension load files - Mailing list pgsql-hackers

From Robert Haas
Subject Re: why two dashes in extension load files
Date
Msg-id AANLkTi=ipZOfiTZej3Gb0eD8Z=8Sevuf9qwwFzh1+rGy@mail.gmail.com
Whole thread Raw
In response to Re: why two dashes in extension load files  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: why two dashes in extension load files  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Feb 14, 2011 at 10:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> Why do the extension load files need two dashes, like xml2--1.0.sql?
>> Why isn't one enough?
>
> Because we'd have to forbid dashes in extension name and version
> strings.  This was judged to be a less annoying solution.  See
> yesterday's discussion.

Are we deparsing the names of the SQL files to infer the set of
version numbers we have to worry about?  It seems to me that if
there's a list of known version numbers somewhere, we can use dash as
the separator without any special restricton.  For example
foo-bar-baz-bletch.sql is either an upgrade script from version
bar-baz to version bletch, or else it's an upgrade script from bar to
baz-bletch.  But presumably no real-world cases will actually be
ambiguous, assuming any sort of half-way sane version numbering
scheme.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tsearch Parser Hacking
Next
From: Thom Brown
Date:
Subject: Re: tsearch Parser Hacking