Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME
Date
Msg-id CAC_2qU8P3wT_yijdzGgZphHFUan7zsgFVSToJWE5s2gucX1mhw@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME
List pgsql-hackers
On Wed, Oct 12, 2011 at 10:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> *shrug* ok. Another thought I had was to have the file raise an error
>> and have that filtered out by the extension mechanism. But I'm not sure
>> if it's worth the trouble.
>
> Hmm ...
>
> \echo You should use CREATE EXTENSION foo to load this file!
>
> and teach CREATE EXTENSION to drop any line beginning with \echo?
> The latter part seems easy enough, but I'm not quite sure about the
> wording or placement of the \echo command.  Putting it at the top
> feels natural but the message might scroll offscreen due to errors...

Decorate them with a marker like:  \extension <name> <version>

And make the CREATE EXTENSION skip (or verify) it?

It will make psql stop on the \extension command.

a.


--
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME