Re: MAGIC_MODULE and libc

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: MAGIC_MODULE and libc
Дата
Msg-id 20061219142328.GH27098@alvh.no-ip.org
обсуждение исходный текст
Ответ на MAGIC_MODULE and libc  ("Jeff Amiel" <jeff.amiel@gmail.com>)
Список pgsql-general
Jeff Amiel wrote:
> 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?

I'd use MyProcPid from #include "miscadmin.h"

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

В списке pgsql-general по дате отправления:

Предыдущее
От: Kaloyan Iliev
Дата:
Сообщение: Float Infinity
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: MAGIC_MODULE and libc