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

Поиск
Список
Период
Сортировка
От George H
Тема Re: How to install UUID module postgres 8.4.4 [Solved]
Дата
Msg-id AANLkTi=HtTo46Wqf1bUzno0-MEUJg9_mhR6mHnat_kvn@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
On Tue, Aug 24, 2010 at 10:48 AM, George H <george.dma@gmail.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.dma@gmail.com
>

I got it. I had to execute this

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

В списке pgsql-novice по дате отправления:

Предыдущее
От: George H
Дата:
Сообщение: How to install UUID module postgres 8.4.4
Следующее
От: "Carel Combrink"
Дата:
Сообщение: Timestamp with Precision