postgresql/contrib/pgcrypto
Tom Lane 220db7ccd8 Simplify and standardize conversions between TEXT datums and ordinary C
strings.  This patch introduces four support functions cstring_to_text,
cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and
two macros CStringGetTextDatum and TextDatumGetCString.  A number of
existing macros that provided variants on these themes were removed.

Most of the places that need to make such conversions now require just one
function or macro call, in place of the multiple notational layers that used
to be needed.  There are no longer any direct calls of textout or textin,
and we got most of the places that were using handmade conversions via
memcpy (there may be a few still lurking, though).

This commit doesn't make any serious effort to eliminate transient memory
leaks caused by detoasting toasted text objects before they reach
text_to_cstring.  We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few
places where it was easy, but much more could be done.

Brendan Jurd and Tom Lane
2008-03-25 22:42:46 +00:00
..
expected Fix a few contrib regression test scripts that hadn't gotten the word 2007-11-13 06:29:04 +00:00
sql Fix a few contrib regression test scripts that hadn't gotten the word 2007-11-13 06:29:04 +00:00
blf.c pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
blf.h pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
crypt-blowfish.c pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
crypt-des.c
crypt-gensalt.c
crypt-md5.c
fortuna.c
fortuna.h
imath.c Silence Solaris compiler warning, per buildfarm. 2007-07-15 22:43:40 +00:00
imath.h pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
internal-sha2.c
internal.c Replace time_t with pg_time_t (same values, but always int64) in on-disk 2008-02-17 02:09:32 +00:00
Makefile Remove references to READMEs from /contrib Makefiles. 2007-11-10 23:59:52 +00:00
mbuf.c Get rid of overly cute, unportable, probably not very efficient substitute 2007-07-15 23:57:13 +00:00
mbuf.h
md5.c Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be 2007-04-06 05:36:51 +00:00
md5.h
openssl.c pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
pgcrypto.c Simplify and standardize conversions between TEXT datums and ordinary C 2008-03-25 22:42:46 +00:00
pgcrypto.h
pgcrypto.sql.in Add CVS version labels to all install/uninstall scripts. 2007-11-13 04:24:29 +00:00
pgp-armor.c
pgp-cfb.c
pgp-compress.c pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
pgp-decrypt.c
pgp-encrypt.c
pgp-info.c
pgp-mpi-internal.c
pgp-mpi-openssl.c
pgp-mpi.c
pgp-pgsql.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
pgp-pubdec.c
pgp-pubenc.c
pgp-pubkey.c
pgp-s2k.c
pgp.c
pgp.h
px-crypt.c
px-crypt.h
px-hmac.c
px.c pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
px.h Fix combo_decrypt() to throw an error for zero-length input when using a 2007-08-23 16:15:51 +00:00
random.c
rijndael.c Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be 2007-04-06 05:36:51 +00:00
rijndael.h
rijndael.tbl
sha1.c Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be 2007-04-06 05:36:51 +00:00
sha1.h
sha2.c pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
sha2.h
uninstall_pgcrypto.sql Add CVS version labels to all install/uninstall scripts. 2007-11-13 04:24:29 +00:00