1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Pass attypmod through to executor by adding to Var and Resdom.

This commit is contained in:
Bruce Momjian
1998-02-10 04:02:59 +00:00
parent 2535fcde2a
commit 2c482cdbf2
40 changed files with 212 additions and 201 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.36 1998/01/21 23:42:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.37 1998/02/10 04:00:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -591,7 +591,7 @@ _copyResdom(Resdom *from)
newnode->resno = from->resno;
newnode->restype = from->restype;
newnode->reslen = from->reslen;
newnode->restypmod = from->restypmod;
if (from->resname != NULL)
newnode->resname = pstrdup(from->resname);
@@ -671,6 +671,7 @@ _copyVar(Var *from)
newnode->varno = from->varno;
newnode->varattno = from->varattno;
newnode->vartype = from->vartype;
newnode->vartypmod = from->vartypmod;
newnode->varlevelsup = from->varlevelsup;
newnode->varnoold = from->varnoold;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.13 1998/01/20 22:11:02 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.14 1998/02/10 04:00:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,7 +42,7 @@ _equalResdom(Resdom *a, Resdom *b)
return (false);
if (a->restype != b->restype)
return (false);
if (a->reslen != b->reslen)
if (a->restypmod != b->restypmod)
return (false);
if (strcmp(a->resname, b->resname) != 0)
return (false);
@@ -129,6 +129,8 @@ _equalVar(Var *a, Var *b)
return (false);
if (a->vartype != b->vartype)
return (false);
if (a->vartypmod != b->vartypmod)
return (false);
if (a->varlevelsup != b->varlevelsup)
return (false);
if (a->varnoold != b->varnoold)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.5 1998/01/20 22:11:05 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.6 1998/02/10 04:00:50 momjian Exp $
*
* NOTES
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
@@ -53,6 +53,7 @@ Var *
makeVar(Index varno,
AttrNumber varattno,
Oid vartype,
int vartypmod,
Index varlevelsup,
Index varnoold,
AttrNumber varoattno)
@@ -62,6 +63,7 @@ makeVar(Index varno,
var->varno = varno;
var->varattno = varattno;
var->vartype = vartype;
var->vartypmod = vartypmod;
var->varlevelsup = varlevelsup;
var->varnoold = varnoold;
var->varoattno = varoattno;
@@ -76,7 +78,7 @@ makeVar(Index varno,
Resdom *
makeResdom(AttrNumber resno,
Oid restype,
int reslen,
int restypmod,
char *resname,
Index reskey,
Oid reskeyop,
@@ -86,7 +88,7 @@ makeResdom(AttrNumber resno,
resdom->resno = resno;
resdom->restype = restype;
resdom->reslen = reslen;
resdom->restypmod = restypmod;
resdom->resname = resname;
resdom->reskey = reskey;
resdom->reskeyop = reskeyop;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.27 1998/01/25 04:07:52 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.28 1998/02/10 04:00:57 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -606,7 +606,7 @@ _outResdom(StringInfo str, Resdom *node)
appendStringInfo(str, buf);
sprintf(buf, " :restype %u ", node->restype);
appendStringInfo(str, buf);
sprintf(buf, " :reslen %d ", node->reslen);
sprintf(buf, " :restypmod %d ", node->restypmod);
appendStringInfo(str, buf);
appendStringInfo(str, " :resname ");
appendStringInfo(str, node->resname);
@@ -698,6 +698,8 @@ _outVar(StringInfo str, Var *node)
appendStringInfo(str, buf);
sprintf(buf, " :vartype %u ", node->vartype);
appendStringInfo(str, buf);
sprintf(buf, " :vartypmod %u ", node->vartypmod);
appendStringInfo(str, buf);
sprintf(buf, " :varlevelsup %u ", node->varlevelsup);
appendStringInfo(str, buf);
sprintf(buf, " :varnoold %d ", node->varnoold);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.22 1998/01/20 22:11:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.23 1998/02/10 04:01:03 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -706,9 +706,9 @@ _readResdom()
token = lsptok(NULL, &length); /* get restype */
local_node->restype = atol(token);
token = lsptok(NULL, &length); /* eat :reslen */
token = lsptok(NULL, &length); /* get reslen */
local_node->reslen = atoi(token);
token = lsptok(NULL, &length); /* eat :restypmod */
token = lsptok(NULL, &length); /* get restypmod */
local_node->restypmod = atoi(token);
token = lsptok(NULL, &length); /* eat :resname */
token = lsptok(NULL, &length); /* get the name */
@@ -814,6 +814,10 @@ _readVar()
token = lsptok(NULL, &length); /* get vartype */
local_node->vartype = (Oid) atol(token);
token = lsptok(NULL, &length); /* eat :vartypmod */
token = lsptok(NULL, &length); /* get vartypmod */
local_node->vartypmod = (Oid) atol(token);
token = lsptok(NULL, &length); /* eat :varlevelsup */
token = lsptok(NULL, &length); /* get varlevelsup */
local_node->varlevelsup = (Oid) atol(token);