postgresql/src/include
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
..
access Support unlogged GiST index. 2013-02-11 23:07:09 +02:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Support unlogged GiST index. 2013-02-11 23:07:09 +02:00
commands Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
common Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Fix plpgsql's reporting of plan-time errors in possibly-simple expressions. 2013-01-30 20:02:23 -05:00
foreign Update copyrights for 2013 2013-01-01 17:15:01 -05:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Update copyrights for 2013 2013-01-01 17:15:01 -05:00
mb Add noreturn attributes to some error reporting functions 2013-02-12 07:13:22 -05:00
nodes Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
optimizer Update copyrights for 2013 2013-01-01 17:15:01 -05:00
parser Add noreturn attributes to some error reporting functions 2013-02-12 07:13:22 -05:00
port Add URLs to document why DLLIMPORT is needed on Windows. 2012-11-07 15:01:25 -05:00
portability Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Fix background workers for EXEC_BACKEND 2013-01-02 12:01:14 -03:00
regex Re-implement extraction of fixed prefixes from regular expressions. 2012-07-10 14:54:37 -04:00
replication Fix more issues with cascading replication and timeline switches. 2013-01-23 10:19:20 +02:00
rewrite Add support for ALTER RULE ... RENAME TO. 2013-02-08 23:58:40 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Add noreturn attributes to some error reporting functions 2013-02-12 07:13:22 -05:00
tcop Add noreturn attributes to some error reporting functions 2013-02-12 07:13:22 -05:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Clean up c.h / postgres.h after Assert() move 2013-02-08 12:50:58 -03:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
miscadmin.h Make sure MaxBackends is always set 2013-01-02 14:39:11 -03:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_config.h.in Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config.h.win32 Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
port.h Use correct output device for Windows prompts. 2013-01-24 16:01:31 -05:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
postgres.h Clean up c.h / postgres.h after Assert() move 2013-02-08 12:50:58 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00