hooks not working in postgresql 9.3 (building from source)

Поиск
Список
Период
Сортировка
От Rajmohan C
Тема hooks not working in postgresql 9.3 (building from source)
Дата
Msg-id CAHaqV0jQt3GceCoXapPPGpeCaG5c8Y9hb7N7hCBXFkYunhT5Tg@mail.gmail.com
обсуждение исходный текст
Ответы Re: hooks not working in postgresql 9.3 (building from source)  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
hi,

   I need to use the hook feature of planner in postgresql 9.3 to perform a task. I am building postgresql from source.
To start with, I wanted to know how to create a hook and attach that shared libray to postgresql. Hence i tried the examples given in "wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf" and 

  I have copied the "my_client_auth.c" file and Makefile into contrib/client_auth folder. make and make install is working fine.
This is the output of make install.

/bin/mkdir -p '/home/rajmohan/projects/lib/postgresql'
/usr/bin/install -c -m 755  my_client_auth.so '/home/rajmohan/projects/lib/postgresql/'

after that i have added shared_preload_libraries = 'my_client_auth' to postgresql.conf

Then i added the line
ClientAuthentication_hook_type client_auth_hook = NULL; at the top of a file say planner.c in postgresql code
and inside a method im checking client_auth_hook value. When i rebuild and run the project,
client_auth_hook value is always zero. It seems my_client_auth.so file is not linked properly to my postgresql project.
Am i missing any step? how to access methods in my_client_auth.so from postgresql. Kindly help

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Display of timestamp in pg_dump custom format
Следующее
От: Andres Freund
Дата:
Сообщение: folder:lk/lk date:yesterday..