X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A25F6D1B3AD for ; Fri, 4 Jun 2004 13:58:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18212-01 for ; Fri, 4 Jun 2004 16:57:57 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 2F5E7D1B187 for ; Fri, 4 Jun 2004 13:57:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i54Gvbn8003903; Fri, 4 Jun 2004 12:57:37 -0400 (EDT) To: Andrew Gold Cc: pgsql-interfaces@postgresql.org Subject: Re: C function linkage and testing In-reply-to: <40C09F5D.2070003@cbamedia.com> References: <40C09F5D.2070003@cbamedia.com> Comments: In-reply-to Andrew Gold message dated "Fri, 04 Jun 2004 09:12:13 -0700" Date: Fri, 04 Jun 2004 12:57:37 -0400 Message-ID: <3901.1086368257@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/5 X-Sequence-Number: 4933 Andrew Gold 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