Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble installing additional module cube in PostgreSQL 8.4
    primarykey
    data
    text
    <p>I am trying to use PostgreSQL with the "Seven Databases in Seven Weeks" book. I am using PostgreSQL 8.4.1 on an Ubuntu 10.04 server.</p> <p>The first task is to create a database named "book" and check if the contrib packages have been installed properly.</p> <pre><code>$ createdb book $ psql book -c "SELECT '1'::cube;" </code></pre> <p>When I do that I get the following output:</p> <pre><code>ERROR: type "cube" does not exist LINE 1: SELECT '1'::cube; </code></pre> <p>I already installed the cube package with the following command:</p> <pre><code>$ sudo -u postgres psql postgres &lt; /usr/share/postgresql/8.4/contrib/cube.sql </code></pre> <p>I tried restarting PostgreSQL but the problem persists. When I tried running the package import a second time I got the following message, which explicitly states that <code>type "cube" already exists</code>:</p> <pre><code>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 &lt; already exists ERROR: operator &gt; already exists ERROR: operator &lt;= already exists ERROR: operator &gt;= already exists ERROR: operator &amp;&amp; already exists ERROR: operator = already exists ERROR: operator &lt;&gt; already exists ERROR: operator @&gt; already exists ERROR: operator &lt;@ 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 </code></pre> <p>So, what am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload