MAGIC_MODULE and libc

From: "Jeff Amiel" <jeff(dot)amiel(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: MAGIC_MODULE and libc
Date: 2006-12-19 14:20:23
Message-ID: a957db620612190620q236a3f34nceba5a5e32cfab2d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I just upgraded to v8.2 and have an issue with one of my stored
proc/functions that worked under 8.1:

CREATE OR REPLACE FUNCTION getpid()
RETURNS integer AS
'/lib/libc.so.6', 'getpid'
LANGUAGE 'c' VOLATILE;

ERROR: incompatible library "/lib/libc.so.6": missing magic block
SQL state: XX000
Hint: Extension libraries are required to use the PG_MODULE_MAGIC macro.

I've added the appropriate macro to all my actual C code...but in this
case surely I am not expected to recompile libc...am I? Is there an
easier way to get the pid of the current process?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kaloyan Iliev 2006-12-19 14:22:40 Float Infinity
Previous Message Christopher Browne 2006-12-19 14:04:14 Re: Second attempt, roll your own autovacuum