Re: [SQL] C function extending postgres

2005-03-21 Thread Theo Galanakis
Title: RE: [SQL] C function extending postgres Sorted Jonathan, thankyou for your help. -Original Message- From: Jonathan Daugherty [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 22 March 2005 4:32 PM To: pgsql-sql@postgresql.org Subject: Re: [SQL] C function extending postgres # I&#

Re: [SQL] C function extending postgres

2005-03-21 Thread Jonathan Daugherty
# I'm actually trying to use a system metrics library from # http://www-usr.inf.ufsm.br/~veiga/liblproc/index-en.html Have you added the path of the lproc library to your /etc/ld.so.conf? -- Jonathan Daugherty http://www.parsed.org ---(end of broadcast)--

Re: [SQL] C function extending postgres

2005-03-21 Thread Theo Galanakis
Title: RE: [SQL] C function extending postgres Thanks for your feedback. I'm actually trying to use a system metrics library from http://www-usr.inf.ufsm.br/~veiga/liblproc/index-en.html I have tried to link the library however I'm still getting the same message. cc -g -I

Re: [SQL] C function extending postgres

2005-03-21 Thread Jonathan Daugherty
# ERROR: could not load library "/usr/lib/pgsql/processinfo.so": # /usr/lib/pgsql/processinfo.so: undefined symbol: proc_cpu_idle My guess that you're not linking against the library that containts 'proc_cpu_idle' when you build your .so. What's the build platform? -- Jonathan Daughert

[SQL] C function extending postgres

2005-03-21 Thread Theo Galanakis
Title: C function extending postgres #include "postgres.h" #include "fmgr.h" #include "proc.h" PG_FUNCTION_INFO_V1(get_process_total); Datum get_process_total(PG_FUNCTION_ARGS) {     float ret;     ret = proc_cpu_user() + proc_cpu_nice() + proc_cpu_system() - proc_cpu_idle();