Re: How to install UUID module postgres 8.4.4 [Solved]

From: George H <george(dot)dma(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to install UUID module postgres 8.4.4 [Solved]
Date: 2010-08-24 08:04:48
Message-ID: AANLkTi=HtTo46Wqf1bUzno0-MEUJg9_mhR6mHnat_kvn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Aug 24, 2010 at 10:48 AM, George H <george(dot)dma(at)gmail(dot)com> wrote:
> Hi,
>
> I'm a new postgresql user and I'm looking forward to using this DB
> engine to its full extent. Though I am having a bit of a problem
> trying to install the OSSP UUID module for postgres.
>
> I have installed postgresql v8.4.4 on Gentoo Linux with the uuid use
> flag which installs OSS-UUID on my system. So that went ok. When I log
> in to psql and try to test it with
>
> psql> CREATE TABLE test (id UUID DEFAULT uuid(1), name TEXT);
>
> I get this error
>
> ERROR:  function uuid(integer) does not exist
> HINT:  No function matches the given name and argument types. You
> might need to add explicit type casts.
>
> And according to
> http://www.postgresql.org/docs/8.3/static/uuid-ossp.html  I tried
>
> mydb=# SELECT uuid_generate_v1();
>
> And I get this.
>
> ERROR:  function uuid_generate_v1() does not exist
> LINE 1: SELECT uuid_generate_v1();
>               ^
> HINT:  No function matches the given name and argument types. You
> might need to add explicit type casts.
>
> I have this feeling that the module is not really installed correctly
> and I can't seem to find a webpage that explains how to install this
> module. I even tried a manual installation of OSSP-UUID and followed
> the instructions in their uuid.txt that says
>
>
>  $ <prefix>/bin/psql \
>    -d <database> \
>    -U postgresql \
>    -f <prefix>/share/postgresql/uuid.sql
>
> And that gives me errors telling me that it cannot drop certain
> functions because it is needed by the system.
>
> Can anyone help me with this problem ?
> Thanks.
>
> --
> George H
> george(dot)dma(at)gmail(dot)com
>

I got it. I had to execute this

$psql -d <database> -U <user> -f /usr/share/postgresql-8.4/contrib/uuid-ossp.sql

Browse pgsql-novice by date

  From Date Subject
Next Message Carel Combrink 2010-08-24 09:45:12 Timestamp with Precision
Previous Message George H 2010-08-24 07:48:37 How to install UUID module postgres 8.4.4