Re: Minor patch for the uuid-ossp extension

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Minor patch for the uuid-ossp extension
Дата
Msg-id 26813.1385133344@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Minor patch for the uuid-ossp extension  (roadrunner6@gmx.at)
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: new unicode table border styles for psql
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Minor patch for the uuid-ossp extension