Re: CurrentMemoryContext

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob Parkinson <rwp(at)biome(dot)ac(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CurrentMemoryContext
Date: 2000-11-07 15:03:27
Message-ID: 5919.973609407@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Parkinson 2000-11-07 15:17:33 Re: CurrentMemoryContext
Previous Message Ned Lilly 2000-11-07 14:55:15 announce list?