Re: why two dashes in extension load files

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: why two dashes in extension load files
Date: 2011-02-15 00:00:18
Message-ID: AANLkTi=ipZOfiTZej3Gb0eD8Z=8Sevuf9qwwFzh1+rGy@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 14, 2011 at 10:13 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2011-02-15 00:02:02 Re: tsearch Parser Hacking
Previous Message Tom Lane 2011-02-14 23:57:06 Re: tsearch Parser Hacking