pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
7+ messages / 7 participants
[nested] [flat]

* BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
@ 2013-01-22 13:31 Jan-Peter.Seifert@gmx.de
  2013-01-22 13:37 ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Heikki Linnakangas <hlinnakangas@vmware.com>
  2013-01-22 13:38 ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Vik Reykja <vikreykja@gmail.com>
  2013-01-22 13:47 ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Marc Balmer <marc@msys.ch>
  0 siblings, 3 replies; 7+ messages in thread

From: Jan-Peter.Seifert@gmx.de @ 2013-01-22 13:31 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      7820
Logged by:          Jan-Peter Seifert
Email address:      Jan-Peter.Seifert@gmx.de
PostgreSQL version: 9.1.7
Operating system:   Windows 7 64-bit
Description:        

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.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
  2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
@ 2013-01-22 13:37 ` Heikki Linnakangas <hlinnakangas@vmware.com>
  2013-01-22 18:26   ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 1 reply; 7+ messages in thread

From: Heikki Linnakangas @ 2013-01-22 13:37 UTC (permalink / raw)
  To: Jan-Peter.Seifert@gmx.de; +Cc: pgsql-bugs

On 22.01.2013 15:31, 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.

Try:

CREATE EXTENSION "uuid-ossp"

- Heikki


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
  2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
  2013-01-22 13:37 ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2013-01-22 18:26   ` Tom Lane <tgl@sss.pgh.pa.us>
  2013-01-22 23:26     ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Daniel Farina <daniel@heroku.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2013-01-22 18:26 UTC (permalink / raw)
  To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: Jan-Peter.Seifert@gmx.de; pgsql-bugs

Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 22.01.2013 15:31, Jan-Peter.Seifert@gmx.de wrote:
> Try:
> CREATE EXTENSION "uuid-ossp"

Although this isn't a bug, it does seem like a usability fail.
Did we make a conscious decision not to call the extension uuid_ossp?
I can't remember one way or the other.  It's probably too late to change
now, though :-(

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
  2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
  2013-01-22 13:37 ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Heikki Linnakangas <hlinnakangas@vmware.com>
  2013-01-22 18:26   ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Tom Lane <tgl@sss.pgh.pa.us>
@ 2013-01-22 23:26     ` Daniel Farina <daniel@heroku.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Daniel Farina @ 2013-01-22 23:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Heikki Linnakangas <hlinnakangas@vmware.com>; Jan-Peter.Seifert@gmx.de; pgsql-bugs

On Tue, Jan 22, 2013 at 10:26 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Heikki Linnakangas <hlinnakangas@vmware.com> writes:
>> On 22.01.2013 15:31, Jan-Peter.Seifert@gmx.de wrote:
>> Try:
>> CREATE EXTENSION "uuid-ossp"
>
> Although this isn't a bug, it does seem like a usability fail.
> Did we make a conscious decision not to call the extension uuid_ossp?
> I can't remember one way or the other.  It's probably too late to change
> now, though :-(

I sort of have good recollection of the history here, I think, because
people have asked me about it quite a few times....  uuid-ossp.sql,
pre CREATE EXTENSION was always named as such, so carrying forward the
most obvious port to CREATE EXTENSION results in a non-SQL safe
identifier.  Pre CREATE EXTENSION it didn't seem obvious that it would
matter how the extension would be named, as long as it looked okay in
psql -f or psql \i, which it did.

Considering the history, most people seem to understand how things
ended up in this way, although it's still a little annoying, and
definitely confusing.

--
fdr


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
  2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
@ 2013-01-22 13:38 ` Vik Reykja <vikreykja@gmail.com>
  2 siblings, 0 replies; 7+ messages in thread

From: Vik Reykja @ 2013-01-22 13:38 UTC (permalink / raw)
  To: Jan-Peter.Seifert@gmx.de; +Cc: 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

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
  2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
@ 2013-01-22 13:47 ` Marc Balmer <marc@msys.ch>
  2013-01-22 22:51   ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
  2 siblings, 1 reply; 7+ messages in thread

From: Marc Balmer @ 2013-01-22 13:47 UTC (permalink / raw)
  To: Jan-Peter.Seifert@gmx.de; +Cc: pgsql-bugs


Am 22.01.2013 um 14:31 schrieb Jan-Peter.Seifert@gmx.de:

> The following bug has been logged on the website:
> 
> Bug reference:      7820
> Logged by:          Jan-Peter Seifert
> Email address:      Jan-Peter.Seifert@gmx.de
> PostgreSQL version: 9.1.7
> Operating system:   Windows 7 64-bit
> Description:        
> 
> 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.

no.  Your syntax is wrong.

> 
> I had to replace the hyphen in file names and in the scripts to make the
> module work.
> 

That is the wrong "fix".  The hyphen has a meaning in SQL.  So you need to properly enclose uuid-ossp in quotes.




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error
  2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
  2013-01-22 13:47 ` Re: BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Marc Balmer <marc@msys.ch>
@ 2013-01-22 22:51   ` Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Jan-Peter Seifert @ 2013-01-22 22:51 UTC (permalink / raw)
  To: Marc Balmer <marc@msys.ch>; +Cc: pgsql-bugs

Am 22.01.2013 14:47, schrieb Marc Balmer:

> no.  Your syntax is wrong.

Well - it's not exactly 'my' syntax - see:
uuid-ossp--1.0.sql
uuid-ossp--unpackaged--1.0.sql

>> I had to replace the hyphen in file names and in the scripts to make the
>> module work.
>>
> That is the wrong "fix".  The hyphen has a meaning in SQL. So you need to properly enclose uuid-ossp in quotes.

I didn't think about the fact that extensions are database objects, too.
It's a bit annoying that this extension has non-standard characters in
its name though. It's the only one from all that currently exist.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2013-01-22 23:26 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 13:31 BUG #7820: Extension uuid-ossp cannot be installed on Windows - getting syntax error Jan-Peter.Seifert@gmx.de
2013-01-22 13:37 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-01-22 18:26   ` Tom Lane <tgl@sss.pgh.pa.us>
2013-01-22 23:26     ` Daniel Farina <daniel@heroku.com>
2013-01-22 13:38 ` Vik Reykja <vikreykja@gmail.com>
2013-01-22 13:47 ` Marc Balmer <marc@msys.ch>
2013-01-22 22:51   ` Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox