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