Re: Minor patch for the uuid-ossp extension - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Minor patch for the uuid-ossp extension
Date
Msg-id 26813.1385133344@sss.pgh.pa.us
Whole thread Raw
In response to Minor patch for the uuid-ossp extension  (roadrunner6@gmx.at)
Responses Re: Minor patch for the uuid-ossp extension  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Minor patch for the uuid-ossp extension  (Mario Weilguni <roadrunner6@gmx.at>)
List pgsql-hackers
roadrunner6@gmx.at writes:
> When trying to add the extension with \i it writes an error message:
>      Use "CREATE EXTENSION uuid-ossp" to load this file.

> Unfortunatly this does not work for extensions with dashes. Must CREATE 
> EXTENSION "uuid-ossp". Proposed patch is attached.

[ memo to self: never, ever accept another contrib module whose name
isn't a plain SQL identifier ]

Yeah, that's a problem, but I don't find your solution acceptable:

-\echo Use "CREATE EXTENSION uuid-ossp" to load this file. \quit
+\echo Use CREATE EXTENSION "uuid-ossp" to load this file. \quit

That's just ignoring the English text quoting convention that these
messages are trying to follow.  I guess we could shade the convention a
bit by using single not double quotes around the recommended command.
psql doesn't make that tremendously easy, but a bit of experimentation
says this works:

regression=# \echo Use '''CREATE EXTENSION "uuid-ossp"''' to load this file. 
Use 'CREATE EXTENSION "uuid-ossp"' to load this file.

Does that look reasonable to people?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: new unicode table border styles for psql
Next
From: Alvaro Herrera
Date:
Subject: Re: Minor patch for the uuid-ossp extension