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

From Tom Lane
Subject Re: why two dashes in extension load files
Date
Msg-id 27849.1297743532@sss.pgh.pa.us
Whole thread Raw
In response to Re: why two dashes in extension load files  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: why two dashes in extension load files  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> On Feb 14, 2011, at 5:03 PM, Tom Lane wrote:
>>> 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.

>> The list of known version numbers is inferred from the available files,
>> not vice versa.  IMO that's a feature not a bug.  A manually maintained
>> list would just be one more thing to forget to update.

> Yes, but the truth is that the extension name, at least, is known from the control file.

Yeah, I think it's true in the current code base that we always know the
extension name we are interested in.  However, that's no protection if
we allow extensions to contain the separator substring.  Considerfoo--bar--baz.sql
Is this an update script for foo (from version bar to version baz),
or is it an install script for some other extension named foo--bar?

Also, I think it'd be better if we didn't assume that we will always
know the extension name when trying to make sense of a script name.
That's the sort of assumption that will bite you on the rear eventually.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: tsearch Parser Hacking
Next
From: "David E. Wheeler"
Date:
Subject: Re: why two dashes in extension load files