Estoy tratando de usar PostgreSQL con el libro "Siete bases de datos en siete semanas". Estoy usando PostgreSQL 8.4.1 en un servidor Ubuntu 10.04.Problema al instalar un cubo de módulo adicional en PostgreSQL 8.4
La primera tarea es crear una base de datos llamada "libro" y comprobar si los paquetes contrib se han instalado correctamente.
$ createdb book
$ psql book -c "SELECT '1'::cube;"
Cuando hago que me da el siguiente resultado:
ERROR: type "cube" does not exist
LINE 1: SELECT '1'::cube;
ya he instalado el paquete de cubo con el siguiente comando:
$ sudo -u postgres psql postgres < /usr/share/postgresql/8.4/contrib/cube.sql
Traté de reiniciar PostgreSQL, pero el problema persiste . Cuando intenté ejecutar el paquete de importar una segunda vez me dieron el siguiente mensaje, que establece explícitamente que 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
Entonces, ¿qué estoy haciendo mal?
Gracias! Eso lo hizo. También probé el método para PostgreSQL 9.1 en otra máquina con Ubuntu 12.04. –