|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.89 2000/05/30 00:49:45 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.90 2000/06/16 05:27:03 tgl Exp $ |
12 | 12 | * |
13 | 13 | * NOTES |
14 | 14 | * Most of the read functions for plan nodes are tested. (In fact, they |
@@ -670,7 +670,7 @@ _readResdom() |
670 | 670 |
|
671 | 671 | token = lsptok(NULL, &length); /* eat :restype */ |
672 | 672 | token = lsptok(NULL, &length); /* get restype */ |
673 | | - local_node->restype = atol(token); |
| 673 | + local_node->restype = (Oid) atol(token); |
674 | 674 |
|
675 | 675 | token = lsptok(NULL, &length); /* eat :restypmod */ |
676 | 676 | token = lsptok(NULL, &length); /* get restypmod */ |
@@ -762,8 +762,17 @@ _readCaseExpr() |
762 | 762 |
|
763 | 763 | local_node = makeNode(CaseExpr); |
764 | 764 |
|
| 765 | + token = lsptok(NULL, &length); /* eat :casetype */ |
| 766 | + token = lsptok(NULL, &length); /* get casetype */ |
| 767 | + local_node->casetype = (Oid) atol(token); |
| 768 | + |
| 769 | + token = lsptok(NULL, &length); /* eat :arg */ |
| 770 | + local_node->arg = nodeRead(true); |
| 771 | + |
| 772 | + token = lsptok(NULL, &length); /* eat :args */ |
765 | 773 | local_node->args = nodeRead(true); |
766 | | - token = lsptok(NULL, &length); /* eat :default */ |
| 774 | + |
| 775 | + token = lsptok(NULL, &length); /* eat :defresult */ |
767 | 776 | local_node->defresult = nodeRead(true); |
768 | 777 |
|
769 | 778 | return local_node; |
@@ -824,15 +833,15 @@ _readVar() |
824 | 833 |
|
825 | 834 | token = lsptok(NULL, &length); /* eat :varlevelsup */ |
826 | 835 | token = lsptok(NULL, &length); /* get varlevelsup */ |
827 | | - local_node->varlevelsup = (Oid) atol(token); |
| 836 | + local_node->varlevelsup = (Index) atoi(token); |
828 | 837 |
|
829 | 838 | token = lsptok(NULL, &length); /* eat :varnoold */ |
830 | 839 | token = lsptok(NULL, &length); /* get varnoold */ |
831 | | - local_node->varnoold = (Oid) atol(token); |
| 840 | + local_node->varnoold = (Index) atoi(token); |
832 | 841 |
|
833 | 842 | token = lsptok(NULL, &length); /* eat :varoattno */ |
834 | 843 | token = lsptok(NULL, &length); /* eat :varoattno */ |
835 | | - local_node->varoattno = (int) atol(token); |
| 844 | + local_node->varoattno = atoi(token); |
836 | 845 |
|
837 | 846 | return local_node; |
838 | 847 | } |
@@ -942,7 +951,7 @@ _readConst() |
942 | 951 |
|
943 | 952 | token = lsptok(NULL, &length); /* get :consttype */ |
944 | 953 | token = lsptok(NULL, &length); /* now read it */ |
945 | | - local_node->consttype = atol(token); |
| 954 | + local_node->consttype = (Oid) atol(token); |
946 | 955 |
|
947 | 956 |
|
948 | 957 | token = lsptok(NULL, &length); /* get :constlen */ |
@@ -1001,11 +1010,11 @@ _readFunc() |
1001 | 1010 |
|
1002 | 1011 | token = lsptok(NULL, &length); /* get :funcid */ |
1003 | 1012 | token = lsptok(NULL, &length); /* now read it */ |
1004 | | - local_node->funcid = atol(token); |
| 1013 | + local_node->funcid = (Oid) atol(token); |
1005 | 1014 |
|
1006 | 1015 | token = lsptok(NULL, &length); /* get :functype */ |
1007 | 1016 | token = lsptok(NULL, &length); /* now read it */ |
1008 | | - local_node->functype = atol(token); |
| 1017 | + local_node->functype = (Oid) atol(token); |
1009 | 1018 |
|
1010 | 1019 | token = lsptok(NULL, &length); /* get :funcisindex */ |
1011 | 1020 | token = lsptok(NULL, &length); /* now read it */ |
@@ -1051,15 +1060,15 @@ _readOper() |
1051 | 1060 |
|
1052 | 1061 | token = lsptok(NULL, &length); /* get :opno */ |
1053 | 1062 | token = lsptok(NULL, &length); /* now read it */ |
1054 | | - local_node->opno = atol(token); |
| 1063 | + local_node->opno = (Oid) atol(token); |
1055 | 1064 |
|
1056 | 1065 | token = lsptok(NULL, &length); /* get :opid */ |
1057 | 1066 | token = lsptok(NULL, &length); /* now read it */ |
1058 | | - local_node->opid = atol(token); |
| 1067 | + local_node->opid = (Oid) atol(token); |
1059 | 1068 |
|
1060 | 1069 | token = lsptok(NULL, &length); /* get :opresulttype */ |
1061 | 1070 | token = lsptok(NULL, &length); /* now read it */ |
1062 | | - local_node->opresulttype = atol(token); |
| 1071 | + local_node->opresulttype = (Oid) atol(token); |
1063 | 1072 |
|
1064 | 1073 | /* |
1065 | 1074 | * NOTE: Alternatively we can call 'replace_opid' which initializes |
@@ -1102,8 +1111,8 @@ _readParam() |
1102 | 1111 |
|
1103 | 1112 | token = lsptok(NULL, &length); /* get :paramtype */ |
1104 | 1113 | token = lsptok(NULL, &length); /* now read it */ |
| 1114 | + local_node->paramtype = (Oid) atol(token); |
1105 | 1115 |
|
1106 | | - local_node->paramtype = atol(token); |
1107 | 1116 | token = lsptok(NULL, &length); /* get :param_tlist */ |
1108 | 1117 | local_node->param_tlist = nodeRead(true); /* now read it */ |
1109 | 1118 |
|
@@ -1711,7 +1720,7 @@ _readPathKeyItem() |
1711 | 1720 | token = lsptok(NULL, &length); /* get :sortop */ |
1712 | 1721 | token = lsptok(NULL, &length); /* now read it */ |
1713 | 1722 |
|
1714 | | - local_node->sortop = atol(token); |
| 1723 | + local_node->sortop = (Oid) atol(token); |
1715 | 1724 |
|
1716 | 1725 | token = lsptok(NULL, &length); /* get :key */ |
1717 | 1726 | local_node->key = nodeRead(true); /* now read it */ |
@@ -1742,19 +1751,19 @@ _readRestrictInfo() |
1742 | 1751 |
|
1743 | 1752 | token = lsptok(NULL, &length); /* get :mergejoinoperator */ |
1744 | 1753 | token = lsptok(NULL, &length); /* now read it */ |
1745 | | - local_node->mergejoinoperator = atol(token); |
| 1754 | + local_node->mergejoinoperator = (Oid) atol(token); |
1746 | 1755 |
|
1747 | 1756 | token = lsptok(NULL, &length); /* get :left_sortop */ |
1748 | 1757 | token = lsptok(NULL, &length); /* now read it */ |
1749 | | - local_node->left_sortop = atol(token); |
| 1758 | + local_node->left_sortop = (Oid) atol(token); |
1750 | 1759 |
|
1751 | 1760 | token = lsptok(NULL, &length); /* get :right_sortop */ |
1752 | 1761 | token = lsptok(NULL, &length); /* now read it */ |
1753 | | - local_node->right_sortop = atol(token); |
| 1762 | + local_node->right_sortop = (Oid) atol(token); |
1754 | 1763 |
|
1755 | 1764 | token = lsptok(NULL, &length); /* get :hashjoinoperator */ |
1756 | 1765 | token = lsptok(NULL, &length); /* now read it */ |
1757 | | - local_node->hashjoinoperator = atol(token); |
| 1766 | + local_node->hashjoinoperator = (Oid) atol(token); |
1758 | 1767 |
|
1759 | 1768 | return local_node; |
1760 | 1769 | } |
|
0 commit comments