Re: contrib Makefiles - Mailing list pgsql-hackers

From Joe Conway
Subject Re: contrib Makefiles
Date
Msg-id 3D5B3B7F.3030703@joeconway.com
Whole thread Raw
In response to Re: contrib Makefiles  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne wrote:
> create function fti() returns opaque as
>         '$libdir/fti'
>         language 'C';
> 
> So it references the fti.so, but where does it say what function to actually
> run in fti.so?  Or is it assumed in C functions that the function to call in
> the shared object is the same as the name of the function???
> 

It does if you're not specific. Take a look at dblink.sql.in. All of the 
dblink functions are in one shared object file.

e.g.
CREATE OR REPLACE FUNCTION dblink (text,text) RETURNS setof int  AS 'MODULE_PATHNAME','dblink' LANGUAGE 'c'  WITH
(isstrict);

CREATE OR REPLACE FUNCTION dblink_tok (int,int) RETURNS text  AS 'MODULE_PATHNAME','dblink_tok' LANGUAGE 'c'  WITH
(isstrict);
...
etc.

Joe



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: contrib Makefiles
Next
From: Tom Lane
Date:
Subject: Re: contrib Makefiles