diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-08-25 17:20:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-08-25 17:20:01 +0000 |
commit | 58de480999da65ec0fbf256f17800cba89e26dd5 (patch) | |
tree | ff80d7c93f5836bbdfdc0b3c6a5165423856cb83 /src/backend/commands/trigger.c | |
parent | d46172e4fa930e18768b8b913166108a4909e858 (diff) | |
download | postgresql-58de480999da65ec0fbf256f17800cba89e26dd5.tar.gz postgresql-58de480999da65ec0fbf256f17800cba89e26dd5.zip |
Clean up comments to be careful about the distinction between variable-
width types and varlena types, since with the introduction of CSTRING as
a more-or-less-real type, these concepts aren't identical. I've tried to
use varlena consistently to denote datatypes with typlen = -1, ie, they
have a length word and are potentially TOASTable; while the term variable
width covers both varlena and cstring (and, perhaps, someday other types
with other rules for computing the actual width). No code changes in this
commit except for renaming a couple macros.
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r-- | src/backend/commands/trigger.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 82feb9333d7..16da206adec 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.128 2002/08/22 00:01:42 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.129 2002/08/25 17:20:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -261,7 +261,7 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint) foreach(le, stmt->args) { - char *ar = ((Value *) lfirst(le))->val.str; + char *ar = strVal(lfirst(le)); len += strlen(ar) + 4; for (; *ar; ar++) @@ -274,7 +274,7 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint) args[0] = '\0'; foreach(le, stmt->args) { - char *s = ((Value *) lfirst(le))->val.str; + char *s = strVal(lfirst(le)); char *d = args + strlen(args); while (*s) @@ -653,8 +653,6 @@ RelationBuildTriggers(Relation relation) ScanKeyData skey; SysScanDesc tgscan; HeapTuple htup; - struct varlena *val; - bool isnull; triggers = (Trigger *) MemoryContextAlloc(CacheMemoryContext, ntrigs * sizeof(Trigger)); @@ -702,12 +700,14 @@ RelationBuildTriggers(Relation relation) FUNC_MAX_ARGS * sizeof(int16)); if (build->tgnargs > 0) { + bytea *val; + bool isnull; char *p; int i; - val = (struct varlena *) fastgetattr(htup, - Anum_pg_trigger_tgargs, - tgrel->rd_att, &isnull); + val = (bytea *) fastgetattr(htup, + Anum_pg_trigger_tgargs, + tgrel->rd_att, &isnull); if (isnull) elog(ERROR, "RelationBuildTriggers: tgargs IS NULL for rel %s", RelationGetRelationName(relation)); |