Thread: UUId or Similar
Hi, it seems every time I install a new version of postgres I go through
this same fight with trying to get UUID to install, Ugg! Anyway in this
case I think I can do without it. Does anyone know what the next best
way to get a unique value would be? maybe using date function or such?
Thanks!
Roy
In response to Morris, Roy : > Hi, it seems every time I install a new version of postgres I go through > this same fight with trying to get UUID to install, Ugg! Anyway in this test=# \i '/usr/share/postgresql/8.3/contrib/uuid-ossp.sql'; test=# select * from uuid_generate_v1(); uuid_generate_v1 -------------------------------------- b3a24ab0-ed4b-11dd-8593-00138f82c65e (1 row) version: 8.3.5 Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
Yes all I get is a bunch of errors, I am running Openbsd 4.4 not linux, although I did install the uuid 1.62? I think and it works fine on the OS. logsvr:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp# uuid 0d1765d2-55a5-11de-aa2c-000f1f69cc7e I am not sure if the actual errors are of any value but here they are .. IIS_Logs=# \i /home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql SET ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_nil() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_nil' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:9: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_ns_dns() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_ns_dns' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:14: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_ns_url() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_ns_url' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:19: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_ns_oid() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_ns_oid' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:24: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_ns_x500() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_ns_x500' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:29: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_generate_v1() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_generate_v1' VOLATILE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:34: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_generate_v1mc() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_generate_v1mc' VOLATILE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:39: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_generate_v3(namespace uuid, name text) RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_generate_v3' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:44: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_generate_v4() RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_generate_v4' VOLATILE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:49: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. STATEMENT: CREATE OR REPLACE FUNCTION uuid_generate_v5(namespace uuid, name text) RETURNS uuid AS '$libdir/uuid-ossp', 'uuid_generate_v5' IMMUTABLE STRICT LANGUAGE C; psql:/home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql:54: ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp":missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. -----Original Message----- From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of A. Kretschmer Sent: Wednesday, January 28, 2009 9:56 AM To: pgsql-novice@postgresql.org Subject: Re: [NOVICE] UUId or Similar In response to Morris, Roy : > Hi, it seems every time I install a new version of postgres I go through > this same fight with trying to get UUID to install, Ugg! Anyway in this test=# \i '/usr/share/postgresql/8.3/contrib/uuid-ossp.sql'; test=# select * from uuid_generate_v1(); uuid_generate_v1 -------------------------------------- b3a24ab0-ed4b-11dd-8593-00138f82c65e (1 row) version: 8.3.5 Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net -- Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-novice
"Morris, Roy" <rmorris@internetsecure.com> writes: > I am not sure if the actual errors are of any value but here they are .. > IIS_Logs=# \i /home/rmorris/postgresql-8.3.5/contrib/uuid-ossp/uuid-ossp.sql > SET > ERROR: incompatible library "/usr/local/pgsql/lib/uuid-ossp": missing magic block > HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. You seem to be trying to use an old (not 8.3) version of uuid-ossp.so. I don't know where you got it from (since we never released any version of uuid-ossp before 8.3), but it's not what it should be. regards, tom lane