Re: statically compiling postgres and problem with initdb

From: Tom Lane
Subject: Re: statically compiling postgres and problem with initdb
Date: ,
Msg-id: 28687.1309535319@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: statically compiling postgres and problem with initdb  (Craig Ringer)
Responses: Re: statically compiling postgres and problem with initdb  (Craig Ringer)
List: pgsql-general


Craig Ringer <> writes:
> On 1/07/2011 5:11 PM, mona attariyan wrote:
>> I'm using Postgres to evaluate a research tool and the tool doesn't work
>> with dynamic libraries. That's why I need to compile it statically.

> For your purposes, you'll have to modify PostgreSQL to support being
> built statically.

It might be easier to rip out the functionality that expects loadable
libraries to work.  I think you could probably get through initdb if you
just disabled creation of encoding-conversion functions and text search
dictionaries (try #ifdef'ing out the relevant sections of initdb.c).

Of course, you'll end up with a pretty crippled version of PG --- no
encoding conversions, no text search, no procedural languages --- but
maybe that's enough for what you want to do.  If it's not, then as Craig
says, you're looking at some pretty major work to bind those pieces into
the executable statically.

            regards, tom lane


pgsql-general by date:

From: Thom Brown
Date:
Subject: Re: Adding Foreign Key Constraint To Existing Table
From: Rich Shepard
Date:
Subject: Re: Adding Foreign Key Constraint To Existing Table