Re: why two dashes in extension load files

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: why two dashes in extension load files
Дата
Msg-id AANLkTi=ipZOfiTZej3Gb0eD8Z=8Sevuf9qwwFzh1+rGy@mail.gmail.com
обсуждение исходный текст
Ответ на Re: why two dashes in extension load files  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: why two dashes in extension load files  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: tsearch Parser Hacking
Следующее
От: Thom Brown
Дата:
Сообщение: Re: tsearch Parser Hacking