Re: Creating server-side functions: one simple error

From: Ruslan A Dautkhanov <rusland(at)scn(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Creating server-side functions: one simple error
Date: 2002-10-10 03:06:39
Message-ID: 3DA4EEBF.20057A8@scn.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:

> Ruslan A Dautkhanov <rusland(at)scn(dot)ru> writes:
> > I have to create my own function in C lanuage, which
> > will use SPI. The problem that when I had done all things,
> > PostgreSQL says:
> > isbs=# select pgf1test('123');
> > ERROR: Can't find function pgf1test in file /usr/local/pgsql/lib/pgf1test.so
>
> But it got past the CREATE FUNCTION command without complaint? That's
> odd, because CREATE FUNCTION should make the same check.
>
> Does the behavior change if you start a fresh session? If so, see
> the LOAD command, which you need to use (or start a fresh session)
> after any change of the shared library file.
>
> regards, tom lane

Yes, you right, I just must run LOAD - after LOAD had complete all works good. Thanks.
Btw, how I can convert TEXT field to a CString one? I had tried to use
char *cnum = PG_GETARG_CSTRING(0) instead of
text tnum = PG_GETARG_NAME(0), but it's not worked properly. Is any function
to convert text object to a null-terminated string??? Thanks again.

--
best regards,
Ruslan A Dautkhanov rusland(at)scn(dot)ru

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Joe Conway 2002-10-10 04:14:19 Re: Creating server-side functions: one simple error
Previous Message Jean-Luc Lachance 2002-10-09 15:33:06 psql does not invoke pager on \h *