Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error - Mailing list pgsql-bugs

From Vik Reykja
Subject Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
Date
Msg-id CALDgxVuHYy41PqWhOgts6iDE+XSvWb5pAsTstKPHP-E92exO-A@mail.gmail.com
Whole thread Raw
In response to BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error  (Jan-Peter.Seifert@gmx.de)
List pgsql-bugs
On Tue, Jan 22, 2013 at 2:31 PM, <Jan-Peter.Seifert@gmx.de> wrote:

> The statement:
> 'CREATE EXTENSION uuid-ossp'
>
> just gives me a syntax error:
>
> ERROR:  syntax error at or near "-"
> LINE 1: CREATE EXTENSION uuid-ossp
>                              ^
> ********** Fehler **********
>
> ERROR: syntax error at or near "-"
> SQL Status:42601
> Zeichen:22
>
> Obviously "CREATE EXTENSION" expects underscores instead of hyphens.
>
> I had to replace the hyphen in file names and in the scripts to make the
> module work.
>

This is not a bug.  You need to quote identifiers that have non-identifier
characters in them, like so:

CREATE EXTENSION "uuid-ossp";

Vik

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
Next
From: Marc Balmer
Date:
Subject: Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error