Sto cercando di utilizzare PostgreSQL con il libro "Seven Databases in Seven Weeks". Sto usando PostgreSQL 8.4.1 su un server Ubuntu 10.04.Problemi nell'installazione di cubo modulo aggiuntivo in PostgreSQL 8.4
Il primo compito è creare un database denominato "libro" e verificare se i pacchetti contrib sono stati installati correttamente.
$ createdb book
$ psql book -c "SELECT '1'::cube;"
Quando faccio che ottengo il seguente output:
ERROR: type "cube" does not exist
LINE 1: SELECT '1'::cube;
ho già installato il pacchetto di cubo con il seguente comando:
$ sudo -u postgres psql postgres < /usr/share/postgresql/8.4/contrib/cube.sql
ho provato a riavviare PostgreSQL ma il problema persiste . Quando ho provato a fare funzionare il pacchetto di importare una seconda volta ho ricevuto il seguente messaggio, in cui si afferma esplicitamente che type "cube" already exists
:
SET
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
ERROR: type "cube" already exists
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
ERROR: operator < already exists
ERROR: operator > already exists
ERROR: operator <= already exists
ERROR: operator >= already exists
ERROR: operator && already exists
ERROR: operator = already exists
ERROR: operator <> already exists
ERROR: operator @> already exists
ERROR: operator <@ already exists
ERROR: operator @ already exists
ERROR: operator ~ already exists
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
ERROR: operator class "cube_ops" for access method "btree" already exists
ERROR: operator class "gist_cube_ops" for access method "gist" already exists
Allora, che cosa sto sbagliando?
Grazie! Questo è stato. Ho anche provato il metodo per PostgreSQL 9.1 su un'altra macchina con Ubuntu 12.04. –