Re: [HACKERS] loading libraries on Postmaster startup

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] loading libraries on Postmaster startup
Date: 2003-02-23 20:00:12
Message-ID: Pine.LNX.4.44.0302232059280.1618-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Joe Conway writes:

> Are you referring to LD_PRELOAD? As I said before, it doesn't help
> preloading the library if I can't also run an initialization function.
> Do you know a way to do that? If so, is it portable?

With GCC you can use __attribute__((constructor)) after the initialization
function. It's pretty ugly to do right, admittedly.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2003-02-23 21:02:27 Re: ILIKE
Previous Message Peter Eisentraut 2003-02-23 19:55:32 Unclear documentation of to_char()

Browse pgsql-patches by date

  From Date Subject
Next Message John Cochran 2003-02-24 08:59:56 Re: [HACKERS] regression failure - horology
Previous Message Joe Conway 2003-02-23 18:10:19 Re: [HACKERS] loading libraries on Postmaster startup