postgresql/src/bin/scripts
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
..
po Translation updates 2011-08-17 14:07:46 +03:00
.gitignore pg_isready 2013-01-23 11:01:20 -05:00
clusterdb.c Support multiple -t/--table arguments for more commands 2013-01-17 11:24:47 +01:00
common.c Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
common.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
createdb.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
createlang.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
createuser.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
dropdb.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
droplang.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
dropuser.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile scripts: Add build prerequisite on libpgport 2013-02-08 06:43:54 -05:00
nls.mk Make _ be automatically included in GETTEXT_TRIGGERS 2011-06-26 23:05:30 +03:00
pg_isready.c Make it easy to time out pg_isready, and make the default 3 seconds. 2013-01-25 12:03:37 -05:00
reindexdb.c Support multiple -t/--table arguments for more commands 2013-01-17 11:24:47 +01:00
vacuumdb.c Support multiple -t/--table arguments for more commands 2013-01-17 11:24:47 +01:00