postgresql/src/bin/psql
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 Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
command.c Create a psql command \gset to store query results into psql variables. 2013-02-02 17:06:38 -05:00
command.h Update copyrights for 2013 2013-01-01 17:15:01 -05: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
copy.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
copy.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
create_help.pl Update copyrights for 2013 2013-01-01 17:15:01 -05:00
describe.c Add prosecdef to \df+ output. 2013-01-25 17:22:26 +02:00
describe.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
help.c Create a psql command \gset to store query results into psql variables. 2013-02-02 17:06:38 -05:00
help.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
input.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
input.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
large_obj.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
large_obj.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
mainloop.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
mainloop.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00
mbprint.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
mbprint.h Fix indentation of \d footers for non-ASCII cases. 2012-03-07 19:25:59 -05:00
nls.mk Fix recently introduced typo in NLS file lists 2012-04-02 02:39:34 +03:00
print.c psql: Improve unaligned expanded output for zero rows 2013-02-09 00:11:58 -05:00
print.h Add a latex-longtable output format to psql 2013-01-17 11:39:38 -05:00
prompt.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
prompt.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
psqlrc.sample Fix filename mention in psqlrc.sample file. 2004-04-22 14:33:49 +00:00
psqlscan.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
psqlscan.l Update copyrights for 2013 2013-01-01 17:15:01 -05:00
settings.h Create a psql command \gset to store query results into psql variables. 2013-02-02 17:06:38 -05:00
startup.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
stringutils.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
stringutils.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tab-complete.c Add support for ALTER RULE ... RENAME TO. 2013-02-08 23:58:40 -05:00
tab-complete.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
variables.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
variables.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00