Re: postgres functions and C++
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Vladimir V. Zolotych" <gsmith@eurocom.od.ua>
Cc: pgsql-hackers@postgresql.org
Date: 2000-10-04T15:29:48Z
Lists: pgsql-hackers
"Vladimir V. Zolotych" <gsmith@eurocom.od.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