Re: postgres functions and C++

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Vladimir V(dot) Zolotych" <gsmith(at)eurocom(dot)od(dot)ua>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgres functions and C++
Date: 2000-10-04 15:29:48
Message-ID: 3332.970673388@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Vladimir V. Zolotych" <gsmith(at)eurocom(dot)od(dot)ua> writes:
> my=> select days_in_month(3, 3, 3);
> ERROR: Can't find function days_in_month in file /tmp/days.so

Try using 'nm' to see what symbol name is actually being exported
from the .so file. I suspect that despite your use of extern "C",
your C++ compiler is being uncooperative and is naming the function
in some strange fashion at the link level.

There is an option in CREATE FUNCTION to specify the link symbol
name separately from the SQL name of the function, so if you can't
get your compiler to play nice you could still get it to work by
quoting whatever nm tells you...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashley Cambrell 2000-10-04 15:30:41 Re: Version data type. - DONE
Previous Message Michael Meskes 2000-10-04 15:16:08 yacc guru needed