Postgres - uuid-ossp error

Started by Adalberto Costaalmost 17 years ago2 messagesgeneral
Jump to latest
#1Adalberto Costa
adalbertodiascosta@gmail.com

Hi,

I'm trying to create a simple function using uuid-ossp package like follows:

CREATE OR REPLACE FUNCTION uuid_nil()
RETURNS uuid
AS '$libdir/uuid-ossp', 'uuid_nil'
IMMUTABLE STRICT LANGUAGE C;

But, I'm getting an error like below:

ERROR: ERROR: could not load library
"/Applications/MAMP/Library/pg/lib/postgresql/uuid-ossp.so":
dlopen(/Applications/MAMP/Library/pg/lib/postgresql/uuid-ossp.so,
10): no suitable
image found. Did find:
/Applications/MAMP/Library/pg/lib/postgresql/uuid-ossp.so:
mach-o, but wrong architecture

Query
= CREATE OR REPLACE FUNCTION uuid_nil()
RETURNS uuid
AS '$libdir/uuid-ossp',
'uuid_nil'
IMMUTABLE STRICT LANGUAGE C

I'm using mac OS-X 10.4 and Postgres 8.3.5 . Can someone help me?

--
Adalberto Dias Costa
Instituto Tecnológico de Aeronáutica - ITA
Sala 78 - Laboratório de Aprendizagem e Interação - LAI
Fone (12) 3947-6869.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Adalberto Costa (#1)
Re: Postgres - uuid-ossp error

Adalberto Costa <adalbertodiascosta@gmail.com> writes:

But, I'm getting an error like below:

ERROR: ERROR: could not load library
"/Applications/MAMP/Library/pg/lib/postgresql/uuid-ossp.so":
dlopen(/Applications/MAMP/Library/pg/lib/postgresql/uuid-ossp.so,
10): no suitable
image found. Did find:
/Applications/MAMP/Library/pg/lib/postgresql/uuid-ossp.so:
mach-o, but wrong architecture

Apparently you're trying to use a uuid-ossp.so file built for Intel Mac
on a PPC Mac, or perhaps vice versa. Get the right type of file, or
build it yourself locally.

regards, tom lane