diff options
| author | Bruce Momjian | 1997-12-06 22:57:36 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1997-12-06 22:57:36 +0000 |
| commit | a68a132a6c0f90e5d03e8409e843e6117d5412a2 (patch) | |
| tree | accca55310ac4cd716800dcb6d27aa37c033027b /src/backend/tcop | |
| parent | 1932d92161b35339a5947eded598233821ca2676 (diff) | |
Add VARHDRSZ where needed. Many places just used 4.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/dest.c | 10 | ||||
| -rw-r--r-- | src/backend/tcop/fastpath.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index 81c80288465..c808a46e1d0 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.14 1997/11/27 03:01:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.15 1997/12/06 22:57:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -192,9 +192,9 @@ NullCommand(CommandDest dest) nPtr = (PQNotifyList *) SLGetSucc(&nPtr->Node)) { pq_putnchar("A", 1); - pq_putint(0, 4); + pq_putint(0, sizeof(int4)); pq_putstr(nPtr->relname); - pq_putint(nPtr->be_pid, 4); + pq_putint(nPtr->be_pid, sizeof(nPtr->be_pid)); PQremoveNotify(nPtr); } pq_flush(); @@ -283,8 +283,8 @@ BeginCommand(char *pname, { pq_putstr(attrs[i]->attname.data); /* if 16 char name * oops.. */ - pq_putint((int) attrs[i]->atttypid, 4); - pq_putint(attrs[i]->attlen, 2); + pq_putint((int) attrs[i]->atttypid, sizeof(attrs[i]->atttypid)); + pq_putint(attrs[i]->attlen, sizeof(attrs[i]->attlen)); } } break; diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 0573ea2fc88..b4fb2ebaec4 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.7 1997/09/18 20:21:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.8 1997/12/06 22:57:03 momjian Exp $ * * NOTES * This cruft is the server side of PQfn. @@ -101,7 +101,7 @@ SendFunctionResult(Oid fid, /* function id */ { /* by-reference ... */ if (retlen < 0) { /* ... varlena */ - pq_putint(VARSIZE(retval) - VARHDRSZ, 4); + pq_putint(VARSIZE(retval) - VARHDRSZ, VARHDRSZ); pq_putnchar(VARDATA(retval), VARSIZE(retval) - VARHDRSZ); } else |
