Alvaro Herrera 8396447cdb Create libpgcommon, and move pg_malloc et al to it
libpgcommon is a new static library to allow sharing code among the
various frontend programs and backend; this lets us eliminate duplicate
implementations of common routines.  We avoid libpgport, because that's
intended as a place for porting issues; per discussion, it seems better
to keep them separate.

The first use case, and the only implemented by this patch, is pg_malloc
and friends, which many frontend programs were already using.

At the same time, we can use this to provide palloc emulation functions
for the frontend; this way, some palloc-using files in the backend can
also be used by the frontend cleanly.  To do this, we change palloc() in
the backend to be a function instead of a macro on top of
MemoryContextAlloc().  This was previously believed to cause loss of
performance, but this implementation has been tweaked by Tom and Andres
so that on modern compilers it provides a slight improvement over the
previous one.

This lets us clean up some places that were already with
localized hacks.

Most of the pg_malloc/palloc changes in this patch were authored by
Andres Freund. Zoltán Böszörményi also independently provided a form of
that.  libpgcommon infrastructure was authored by Álvaro.
2013-02-12 11:21:05 -03:00
..
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-02-06 00:19:53 -03:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2013-01-01 17:15:01 -05:00
2012-12-06 17:47:30 -03:00
2012-12-06 17:47:30 -03:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "gmake all" and "gmake
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.