1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-14 02:22:38 +03:00

Properly detoast access to bytea field pg_trigger.tgargs. Old code

might cause server crash.

Backpatch to 8.2.X.
This commit is contained in:
Bruce Momjian
2007-01-25 04:17:46 +00:00
parent 251281767a
commit 5af6b2abe9
3 changed files with 6 additions and 9 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.245 2007/01/20 23:13:01 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.246 2007/01/25 04:17:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -529,8 +529,7 @@ pg_get_triggerdef(PG_FUNCTION_ARGS)
char *p;
int i;
val = (bytea *)
DatumGetPointer(fastgetattr(ht_trig,
val = DatumGetByteaP(fastgetattr(ht_trig,
Anum_pg_trigger_tgargs,
tgrel->rd_att, &isnull));
if (isnull)