Linking in sin() as a C function - Mailing list pgsql-general

From mathprof@bigfoot.com
Subject Linking in sin() as a C function
Date
Msg-id 200002010350.VAA14455@bunyip.flash.net
Whole thread Raw
In response to sin() in PostgreSQL?  (mathprof@bigfoot.com)
Responses Re: [GENERAL] Linking in sin() as a C function  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
List pgsql-general
I tried the following, one at a time, to create sin() for PostgreSQL:

CREATE FUNCTION sin(float8) RETURNS float8 AS '/usr/lib/libm.so' LANGUAGE 'c';
CREATE FUNCTION sin(float4) RETURNS float4 AS '/usr/lib/libm.so' LANGUAGE 'c';
CREATE FUNCTION sin(float4) RETURNS float8 AS '/usr/lib/libm.so' LANGUAGE 'c';
CREATE FUNCTION sin(float8) RETURNS float4 AS '/usr/lib/libm.so' LANGUAGE 'c';

Each of these gave different and odd results (and a 'segmentation fault'
at one point), but none of them gave the right answer. What am I doing
wrong?


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] SQL Book
Next
From: Karel Zak - Zakkr
Date:
Subject: Re: [GENERAL] Linking in sin() as a C function