From: | Bob Parkinson <rwp(at)biome(dot)ac(dot)uk> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: CurrentMemoryContext |
Date: | 2000-11-07 15:17:33 |
Message-ID: | Pine.OSF.4.21.0011071506370.18183-100000@omni166.library.nottingham.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I was trying to have a single .so that I can use in postgres, but
also by a perlXS function. I want access to the same function within
postgres, and externally in perl. Trying to get a single bit of code.
I'll restructure this bit of code, to take you comments into account.
cheers,
Bob
On Tue, 7 Nov 2000, Tom Lane wrote:
> Bob Parkinson <rwp(at)biome(dot)ac(dot)uk> writes:
> > Is CurrentMemoryContext a postgres symbol that I can link against?
>
> Yes, it should be accessible to shared libs that are loaded into a
> backend.
>
> > accessable to postgres, as a .so, and perl. The .so bit works, but I'm
> > trying to now build the Perl module calling the C code. I'm getting
>
> > Undefined symbol "CurrentMemoryContext"
>
> If I'm visualizing your setup correctly, you are trying to load this
> code into a Perl executable? It's not going to work to load backend
> code into Perl, because none of the backend support routines are going
> to be accessible. Probably CurrentMemoryContext is just by chance the
> first unresolvable symbol the linker found --- there'll be more if you
> get past that one.
>
> Code that's supposed to go into non-backend contexts shouldn't be using
> any Postgres-specific include files...
>
> regards, tom lane
>
Bob Parkinson
rwp(at)biome(dot)ac(dot)uk
------------------------------------------------------------------
Technical Manager: Biome http://biome.ac.uk/
Greenfield Medical Library,
Queens Medical Centre,
Nottingham. 0115 9249924 x 42059
------------------------------------------------------------------
We are stardust
From | Date | Subject | |
---|---|---|---|
Next Message | James Hall | 2000-11-07 15:48:46 | libpq.so.2.0 problem |
Previous Message | Tom Lane | 2000-11-07 15:03:27 | Re: CurrentMemoryContext |