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

From: Vik Reykja <vikreykja(at)gmail(dot)com>
To: Jan-Peter(dot)Seifert(at)gmx(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
Date: 2013-01-22 13:38:07
Message-ID: CALDgxVuHYy41PqWhOgts6iDE+XSvWb5pAsTstKPHP-E92exO-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 22, 2013 at 2:31 PM, <Jan-Peter(dot)Seifert(at)gmx(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Marc Balmer 2013-01-22 13:47:41 Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
Previous Message Heikki Linnakangas 2013-01-22 13:37:34 Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error