Skip site navigation (1) Skip section navigation (2)

Re: C function linkage and testing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gold <agold(at)cbamedia(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: C function linkage and testing
Date: 2004-06-04 16:57:37
Message-ID: 3901.1086368257@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Andrew Gold <agold(at)cbamedia(dot)com> writes:
> I'm writing a number of C SQL-extension functions and it occurred to me 
> that I might need to debug these things as some point. If I want to 
> create my own main () function to exercise my extensions, what Postgres 
> libraries do I need to link against?

There are no libraries for backend internal functions, and I doubt that
it would make any sense to provide such.  (By the time you got done
duplicating the behavior of palloc and elog, you'd have a mini-backend
anyway --- you'd certainly not have a "library" that could be plugged
into any random main program.)

Usually people who want to debug such stuff just attach to a running
backend with a debugger, and debug the code in the live environment.

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: David KillianDate: 2004-06-05 00:59:12
Subject: Problem linking libpq
Previous:From: Andrew GoldDate: 2004-06-04 16:12:13
Subject: C function linkage and testing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group