Hi all,
loading a function written in C I get this error:

#create function email_in( cstring ) returns email AS 'emaildt.so', 'email_in' LANGUAGE C STRICT;
NOTICE:  type "email" is not yet defined
DETAIL:  Creating a shell type definition.
ERROR:  could not load library "emaildt.so": emaildt.so: undefined symbol: pg_begintypsend


I'm compiling my files in this way:

gcc -c  -g -fPIC -o "email.o" -I /usr/include/pgsql/server "email.c"
gcc -g -shared -fPIC -o "emaildt.so" email.o


which library I have to link in order to have the symbol pg_begintypsend ?


Regards
Gaetano Mendola






Thu, 13 May 2004 21:21:30 +0200
Gaetano Mendola <mendola@bigfoot.com>
pg_begintypend
I see this code in pg_ctl:

   PID=`sed -n 1p $PIDFILE`
   if [ "$PID" -lt 0 ];then
       PID=`expr 0 - $PID`


Wnen it is possible (and why) to have a negative number in postmaster.pid?

Thanks,
Mike





Thu, 13 May 2004 16:26:32 -0400
Michael Brusser <michael@synchronicity.com>
negative pid?
Sorry, I should have checked the source first.
Just found this in miscinit.c :

* By convention, the owning process' PID is negated if it is a standalone
* backend rather than a postmaster.  This is just for informational
purposes.

====================

> -----Original Message-----

> I see this code in pg_ctl:
>
>    PID=`sed -n 1p $PIDFILE`
>    if [ "$PID" -lt 0 ];then
>        PID=`expr 0 - $PID`
>
>
> Wnen it is possible (and why) to have a negative number in postmaster.pid?



Thu, 13 May 2004 16:58:41 -0400
Michael Brusser <michael@synchronicity.com>
Re: negative pid?
Gaetano Mendola <mendola@bigfoot.com> writes:
> which library I have to link in order to have the symbol pg_begintypsend ?

I think you want pq_begintypsend.

Consider paying more attention to unknown-function warnings from your
compiler.

			regards, tom lane

Thu, 13 May 2004 20:39:55 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_begintypend 
Tom Lane wrote:

> Gaetano Mendola <mendola@bigfoot.com> writes:
> 
>>which library I have to link in order to have the symbol pg_begintypsend ?
> 
> 
> I think you want pq_begintypsend.
> 
> Consider paying more attention to unknown-function warnings from your
> compiler.

I had no warning at all, I think I have to increment the warning setting
during my compilation.

Gaetano



Fri, 14 May 2004 11:33:15 +0200
Gaetano Mendola <mendola@bigfoot.com>
Re: pg_begintypend