Re: Minor patch for the uuid-ossp extension

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: roadrunner6(at)gmx(dot)at
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Minor patch for the uuid-ossp extension
Date: 2013-11-22 15:15:44
Message-ID: 26813.1385133344@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

roadrunner6(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-11-22 15:19:43 Re: Minor patch for the uuid-ossp extension
Previous Message Merlin Moncure 2013-11-22 15:05:30 Re: new unicode table border styles for psql