mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Change atttypmod from int16 to int32, for Thomas.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.40 1998/06/15 19:27:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.41 1998/07/12 21:29:13 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@@ -255,7 +255,7 @@ TupleDescInitEntry(TupleDesc desc,
|
||||
AttrNumber attributeNumber,
|
||||
char *attributeName,
|
||||
Oid typeid,
|
||||
int16 typmod,
|
||||
int32 typmod,
|
||||
int attdim,
|
||||
bool attisset)
|
||||
{
|
||||
@@ -448,7 +448,7 @@ BuildDescForRelation(List *schema, char *relname)
|
||||
TupleConstr *constr = (TupleConstr *) palloc(sizeof(TupleConstr));
|
||||
char *attname;
|
||||
char *typename;
|
||||
int16 atttypmod;
|
||||
int32 atttypmod;
|
||||
int attdim;
|
||||
int ndef = 0;
|
||||
bool attisset;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.43 1998/06/15 19:28:09 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.44 1998/07/12 21:29:13 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -107,7 +107,7 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
|
||||
* AttrNumber attnum;
|
||||
* uint32 attnelems;
|
||||
* int32 attcacheoff;
|
||||
* int16 atttypmod;
|
||||
* int32 atttypmod;
|
||||
* bool attbyval;
|
||||
* bool attisset;
|
||||
* char attalign;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.47 1998/06/19 11:40:46 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.48 1998/07/12 21:29:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -205,7 +205,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
FmgrInfo *out_functions;
|
||||
Oid out_func_oid;
|
||||
Oid *elements;
|
||||
int16 *typmod;
|
||||
int32 *typmod;
|
||||
Datum value;
|
||||
bool isnull; /* The attribute we are copying is null */
|
||||
char *nulls;
|
||||
@@ -231,7 +231,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
{
|
||||
out_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
|
||||
elements = (Oid *) palloc(attr_count * sizeof(Oid));
|
||||
typmod = (int16 *) palloc(attr_count * sizeof(int16));
|
||||
typmod = (int32 *) palloc(attr_count * sizeof(int16));
|
||||
for (i = 0; i < attr_count; i++)
|
||||
{
|
||||
out_func_oid = (Oid) GetOutputFunction(attr[i]->atttypid);
|
||||
@@ -378,7 +378,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
tuples_read = 0;
|
||||
bool reading_to_eof = true;
|
||||
Oid *elements;
|
||||
int16 *typmod;
|
||||
int32 *typmod;
|
||||
FuncIndexInfo *finfo,
|
||||
**finfoP = NULL;
|
||||
TupleDesc *itupdescArr;
|
||||
@@ -499,7 +499,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
{
|
||||
in_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
|
||||
elements = (Oid *) palloc(attr_count * sizeof(Oid));
|
||||
typmod = (int16 *) palloc(attr_count * sizeof(int16));
|
||||
typmod = (int32 *) palloc(attr_count * sizeof(int16));
|
||||
for (i = 0; i < attr_count; i++)
|
||||
{
|
||||
in_func_oid = (Oid) GetInputFunction(attr[i]->atttypid);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.9 1998/02/26 04:32:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.10 1998/07/12 21:29:16 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
|
||||
@@ -53,7 +53,7 @@ Var *
|
||||
makeVar(Index varno,
|
||||
AttrNumber varattno,
|
||||
Oid vartype,
|
||||
int16 vartypmod,
|
||||
int32 vartypmod,
|
||||
Index varlevelsup,
|
||||
Index varnoold,
|
||||
AttrNumber varoattno)
|
||||
@@ -78,7 +78,7 @@ makeVar(Index varno,
|
||||
Resdom *
|
||||
makeResdom(AttrNumber resno,
|
||||
Oid restype,
|
||||
int16 restypmod,
|
||||
int32 restypmod,
|
||||
char *resname,
|
||||
Index reskey,
|
||||
Oid reskeyop,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.11 1998/06/15 19:28:46 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.12 1998/07/12 21:29:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -319,7 +319,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
|
||||
|
||||
temp_list = MakeTLE(makeResdom(attno,
|
||||
atttype,
|
||||
get_atttypmod(relid, attno),
|
||||
get_atttypmod(relid, attno),
|
||||
attname,
|
||||
0,
|
||||
(Oid) 0,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.31 1998/07/08 14:04:10 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.32 1998/07/12 21:29:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "parser/parse_target.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
static Node *parser_typecast(Value *expr, TypeName *typename, int16 atttypmod);
|
||||
static Node *parser_typecast(Value *expr, TypeName *typename, int32 atttypmod);
|
||||
|
||||
/*
|
||||
* transformExpr -
|
||||
@@ -433,7 +433,7 @@ exprType(Node *expr)
|
||||
}
|
||||
|
||||
static Node *
|
||||
parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
|
||||
parser_typecast(Value *expr, TypeName *typename, int32 atttypmod)
|
||||
{
|
||||
/* check for passing non-ints */
|
||||
Const *adt;
|
||||
@@ -513,7 +513,7 @@ parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
|
||||
* Convert (only) constants to specified type.
|
||||
*/
|
||||
Node *
|
||||
parser_typecast2(Node *expr, Oid exprType, Type tp, int16 atttypmod)
|
||||
parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
|
||||
{
|
||||
/* check for passing non-ints */
|
||||
Const *adt;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.20 1998/07/08 14:04:10 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.21 1998/07/12 21:29:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1220,7 +1220,7 @@ setup_tlist(char *attname, Oid relid)
|
||||
Resdom *resnode;
|
||||
Var *varnode;
|
||||
Oid typeid;
|
||||
int16 type_mod;
|
||||
int32 type_mod;
|
||||
int attno;
|
||||
|
||||
attno = get_attnum(relid, attname);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.16 1998/05/29 14:00:21 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.17 1998/07/12 21:29:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -222,7 +222,7 @@ make_var(ParseState *pstate, Oid relid, char *refname,
|
||||
int vnum,
|
||||
attid;
|
||||
Oid vartypeid;
|
||||
int16 type_mod;
|
||||
int32 type_mod;
|
||||
int sublevels_up;
|
||||
|
||||
vnum = refnameRangeTablePosn(pstate, refname, &sublevels_up);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.17 1998/07/08 14:04:11 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.18 1998/07/12 21:29:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ Node *
|
||||
SizeTargetExpr(ParseState *pstate,
|
||||
Node *expr,
|
||||
Oid attrtype,
|
||||
int16 attrtypmod);
|
||||
int32 attrtypmod);
|
||||
|
||||
|
||||
/* transformTargetIdent()
|
||||
@@ -92,7 +92,7 @@ transformTargetIdent(ParseState *pstate,
|
||||
resdomno_target;
|
||||
RangeTblEntry *rte;
|
||||
char *target_colname;
|
||||
int16 attrtypmod,
|
||||
int32 attrtypmod,
|
||||
attrtypmod_target;
|
||||
|
||||
target_colname = *resname;
|
||||
@@ -154,7 +154,7 @@ printf("transformTargetIdent- transform type %d to %d\n",
|
||||
if (expr == NULL)
|
||||
{
|
||||
char *name;
|
||||
int16 type_mod;
|
||||
int32 type_mod;
|
||||
|
||||
name = ((*resname != NULL)? *resname: colname);
|
||||
|
||||
@@ -333,7 +333,7 @@ printf("transformTargetList: decode T_Expr\n");
|
||||
case T_Attr:
|
||||
{
|
||||
Oid type_id;
|
||||
int16 type_mod;
|
||||
int32 type_mod;
|
||||
Attr *att = (Attr *) res->val;
|
||||
Node *result;
|
||||
char *attrname;
|
||||
@@ -507,7 +507,7 @@ Node *
|
||||
SizeTargetExpr(ParseState *pstate,
|
||||
Node *expr,
|
||||
Oid attrtype,
|
||||
int16 attrtypmod)
|
||||
int32 attrtypmod)
|
||||
{
|
||||
int i;
|
||||
HeapTuple ftup;
|
||||
@@ -579,7 +579,7 @@ MakeTargetlistExpr(ParseState *pstate,
|
||||
{
|
||||
Oid type_id,
|
||||
attrtype;
|
||||
int16 type_mod,
|
||||
int32 type_mod,
|
||||
attrtypmod;
|
||||
int resdomno;
|
||||
Relation rd;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.11 1998/06/15 19:28:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.12 1998/07/12 21:29:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -138,7 +138,7 @@ typeTypeFlag(Type t)
|
||||
/* Given a type structure and a string, returns the internal form of
|
||||
that string */
|
||||
char *
|
||||
stringTypeString(Type tp, char *string, int16 atttypmod)
|
||||
stringTypeString(Type tp, char *string, int32 atttypmod)
|
||||
{
|
||||
Oid op;
|
||||
Oid typelem;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.30 1998/06/15 19:29:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.31 1998/07/12 21:29:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -45,7 +45,7 @@
|
||||
static int _ArrayCount(char *str, int dim[], int typdelim);
|
||||
static char *
|
||||
_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
|
||||
FmgrInfo *inputproc, Oid typelem, int16 typmod,
|
||||
FmgrInfo *inputproc, Oid typelem, int32 typmod,
|
||||
char typdelim, int typlen, bool typbyval,
|
||||
char typalign, int *nbytes);
|
||||
|
||||
@@ -94,7 +94,7 @@ static char *array_seek(char *ptr, int eltsize, int nitems);
|
||||
char *
|
||||
array_in(char *string, /* input array in external form */
|
||||
Oid element_type, /* type OID of an array element */
|
||||
int16 typmod)
|
||||
int32 typmod)
|
||||
{
|
||||
int typlen;
|
||||
bool typbyval,
|
||||
@@ -360,7 +360,7 @@ _ReadArrayStr(char *arrayStr,
|
||||
FmgrInfo *inputproc, /* function used for the
|
||||
* conversion */
|
||||
Oid typelem,
|
||||
int16 typmod,
|
||||
int32 typmod,
|
||||
char typdelim,
|
||||
int typlen,
|
||||
bool typbyval,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.34 1998/06/16 06:41:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.35 1998/07/12 21:29:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ char *convertstr(char *, int, int);
|
||||
* because we pass typelem as the second argument for array_in.)
|
||||
*/
|
||||
char *
|
||||
bpcharin(char *s, int dummy, int16 atttypmod)
|
||||
bpcharin(char *s, int dummy, int32 atttypmod)
|
||||
{
|
||||
char *result,
|
||||
*r;
|
||||
@@ -291,7 +291,7 @@ printf("bpchar- convert string length %d (%d) ->%d\n",
|
||||
* because we pass typelem as the second argument for array_in.)
|
||||
*/
|
||||
char *
|
||||
varcharin(char *s, int dummy, int16 atttypmod)
|
||||
varcharin(char *s, int dummy, int32 atttypmod)
|
||||
{
|
||||
char *result;
|
||||
int len;
|
||||
|
||||
6
src/backend/utils/cache/lsyscache.c
vendored
6
src/backend/utils/cache/lsyscache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.14 1998/06/15 19:29:40 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.15 1998/07/12 21:29:24 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Eventually, the index information should go through here, too.
|
||||
@@ -161,7 +161,7 @@ get_attisset(Oid relid, char *attname)
|
||||
* return the "atttypmod" field from the attribute relation.
|
||||
*
|
||||
*/
|
||||
int16
|
||||
int32
|
||||
get_atttypmod(Oid relid, AttrNumber attnum)
|
||||
{
|
||||
FormData_pg_attribute att_tup;
|
||||
@@ -169,7 +169,7 @@ get_atttypmod(Oid relid, AttrNumber attnum)
|
||||
if (SearchSysCacheStruct(ATTNUM,
|
||||
(char *) &att_tup,
|
||||
ObjectIdGetDatum(relid),
|
||||
UInt16GetDatum(attnum),
|
||||
Int32GetDatum(attnum),
|
||||
0, 0))
|
||||
return att_tup.atttypmod;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user