mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 00:03:56 -04:00
Change atttypmod from int16 to int32, for Thomas.
This commit is contained in:
parent
647bbfb086
commit
683f399391
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||||
@ -255,7 +255,7 @@ TupleDescInitEntry(TupleDesc desc,
|
|||||||
AttrNumber attributeNumber,
|
AttrNumber attributeNumber,
|
||||||
char *attributeName,
|
char *attributeName,
|
||||||
Oid typeid,
|
Oid typeid,
|
||||||
int16 typmod,
|
int32 typmod,
|
||||||
int attdim,
|
int attdim,
|
||||||
bool attisset)
|
bool attisset)
|
||||||
{
|
{
|
||||||
@ -448,7 +448,7 @@ BuildDescForRelation(List *schema, char *relname)
|
|||||||
TupleConstr *constr = (TupleConstr *) palloc(sizeof(TupleConstr));
|
TupleConstr *constr = (TupleConstr *) palloc(sizeof(TupleConstr));
|
||||||
char *attname;
|
char *attname;
|
||||||
char *typename;
|
char *typename;
|
||||||
int16 atttypmod;
|
int32 atttypmod;
|
||||||
int attdim;
|
int attdim;
|
||||||
int ndef = 0;
|
int ndef = 0;
|
||||||
bool attisset;
|
bool attisset;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* INTERFACE ROUTINES
|
||||||
@ -107,7 +107,7 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
|
|||||||
* AttrNumber attnum;
|
* AttrNumber attnum;
|
||||||
* uint32 attnelems;
|
* uint32 attnelems;
|
||||||
* int32 attcacheoff;
|
* int32 attcacheoff;
|
||||||
* int16 atttypmod;
|
* int32 atttypmod;
|
||||||
* bool attbyval;
|
* bool attbyval;
|
||||||
* bool attisset;
|
* bool attisset;
|
||||||
* char attalign;
|
* char attalign;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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;
|
FmgrInfo *out_functions;
|
||||||
Oid out_func_oid;
|
Oid out_func_oid;
|
||||||
Oid *elements;
|
Oid *elements;
|
||||||
int16 *typmod;
|
int32 *typmod;
|
||||||
Datum value;
|
Datum value;
|
||||||
bool isnull; /* The attribute we are copying is null */
|
bool isnull; /* The attribute we are copying is null */
|
||||||
char *nulls;
|
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));
|
out_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
|
||||||
elements = (Oid *) palloc(attr_count * sizeof(Oid));
|
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++)
|
for (i = 0; i < attr_count; i++)
|
||||||
{
|
{
|
||||||
out_func_oid = (Oid) GetOutputFunction(attr[i]->atttypid);
|
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;
|
tuples_read = 0;
|
||||||
bool reading_to_eof = true;
|
bool reading_to_eof = true;
|
||||||
Oid *elements;
|
Oid *elements;
|
||||||
int16 *typmod;
|
int32 *typmod;
|
||||||
FuncIndexInfo *finfo,
|
FuncIndexInfo *finfo,
|
||||||
**finfoP = NULL;
|
**finfoP = NULL;
|
||||||
TupleDesc *itupdescArr;
|
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));
|
in_functions = (FmgrInfo *) palloc(attr_count * sizeof(FmgrInfo));
|
||||||
elements = (Oid *) palloc(attr_count * sizeof(Oid));
|
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++)
|
for (i = 0; i < attr_count; i++)
|
||||||
{
|
{
|
||||||
in_func_oid = (Oid) GetInputFunction(attr[i]->atttypid);
|
in_func_oid = (Oid) GetInputFunction(attr[i]->atttypid);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
|
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
|
||||||
@ -53,7 +53,7 @@ Var *
|
|||||||
makeVar(Index varno,
|
makeVar(Index varno,
|
||||||
AttrNumber varattno,
|
AttrNumber varattno,
|
||||||
Oid vartype,
|
Oid vartype,
|
||||||
int16 vartypmod,
|
int32 vartypmod,
|
||||||
Index varlevelsup,
|
Index varlevelsup,
|
||||||
Index varnoold,
|
Index varnoold,
|
||||||
AttrNumber varoattno)
|
AttrNumber varoattno)
|
||||||
@ -78,7 +78,7 @@ makeVar(Index varno,
|
|||||||
Resdom *
|
Resdom *
|
||||||
makeResdom(AttrNumber resno,
|
makeResdom(AttrNumber resno,
|
||||||
Oid restype,
|
Oid restype,
|
||||||
int16 restypmod,
|
int32 restypmod,
|
||||||
char *resname,
|
char *resname,
|
||||||
Index reskey,
|
Index reskey,
|
||||||
Oid reskeyop,
|
Oid reskeyop,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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,
|
temp_list = MakeTLE(makeResdom(attno,
|
||||||
atttype,
|
atttype,
|
||||||
get_atttypmod(relid, attno),
|
get_atttypmod(relid, attno),
|
||||||
attname,
|
attname,
|
||||||
0,
|
0,
|
||||||
(Oid) 0,
|
(Oid) 0,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 "parser/parse_target.h"
|
||||||
#include "utils/builtins.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 -
|
* transformExpr -
|
||||||
@ -433,7 +433,7 @@ exprType(Node *expr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Node *
|
static Node *
|
||||||
parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
|
parser_typecast(Value *expr, TypeName *typename, int32 atttypmod)
|
||||||
{
|
{
|
||||||
/* check for passing non-ints */
|
/* check for passing non-ints */
|
||||||
Const *adt;
|
Const *adt;
|
||||||
@ -513,7 +513,7 @@ parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
|
|||||||
* Convert (only) constants to specified type.
|
* Convert (only) constants to specified type.
|
||||||
*/
|
*/
|
||||||
Node *
|
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 */
|
/* check for passing non-ints */
|
||||||
Const *adt;
|
Const *adt;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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;
|
Resdom *resnode;
|
||||||
Var *varnode;
|
Var *varnode;
|
||||||
Oid typeid;
|
Oid typeid;
|
||||||
int16 type_mod;
|
int32 type_mod;
|
||||||
int attno;
|
int attno;
|
||||||
|
|
||||||
attno = get_attnum(relid, attname);
|
attno = get_attnum(relid, attname);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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,
|
int vnum,
|
||||||
attid;
|
attid;
|
||||||
Oid vartypeid;
|
Oid vartypeid;
|
||||||
int16 type_mod;
|
int32 type_mod;
|
||||||
int sublevels_up;
|
int sublevels_up;
|
||||||
|
|
||||||
vnum = refnameRangeTablePosn(pstate, refname, &sublevels_up);
|
vnum = refnameRangeTablePosn(pstate, refname, &sublevels_up);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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,
|
SizeTargetExpr(ParseState *pstate,
|
||||||
Node *expr,
|
Node *expr,
|
||||||
Oid attrtype,
|
Oid attrtype,
|
||||||
int16 attrtypmod);
|
int32 attrtypmod);
|
||||||
|
|
||||||
|
|
||||||
/* transformTargetIdent()
|
/* transformTargetIdent()
|
||||||
@ -92,7 +92,7 @@ transformTargetIdent(ParseState *pstate,
|
|||||||
resdomno_target;
|
resdomno_target;
|
||||||
RangeTblEntry *rte;
|
RangeTblEntry *rte;
|
||||||
char *target_colname;
|
char *target_colname;
|
||||||
int16 attrtypmod,
|
int32 attrtypmod,
|
||||||
attrtypmod_target;
|
attrtypmod_target;
|
||||||
|
|
||||||
target_colname = *resname;
|
target_colname = *resname;
|
||||||
@ -154,7 +154,7 @@ printf("transformTargetIdent- transform type %d to %d\n",
|
|||||||
if (expr == NULL)
|
if (expr == NULL)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
int16 type_mod;
|
int32 type_mod;
|
||||||
|
|
||||||
name = ((*resname != NULL)? *resname: colname);
|
name = ((*resname != NULL)? *resname: colname);
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ printf("transformTargetList: decode T_Expr\n");
|
|||||||
case T_Attr:
|
case T_Attr:
|
||||||
{
|
{
|
||||||
Oid type_id;
|
Oid type_id;
|
||||||
int16 type_mod;
|
int32 type_mod;
|
||||||
Attr *att = (Attr *) res->val;
|
Attr *att = (Attr *) res->val;
|
||||||
Node *result;
|
Node *result;
|
||||||
char *attrname;
|
char *attrname;
|
||||||
@ -507,7 +507,7 @@ Node *
|
|||||||
SizeTargetExpr(ParseState *pstate,
|
SizeTargetExpr(ParseState *pstate,
|
||||||
Node *expr,
|
Node *expr,
|
||||||
Oid attrtype,
|
Oid attrtype,
|
||||||
int16 attrtypmod)
|
int32 attrtypmod)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
HeapTuple ftup;
|
HeapTuple ftup;
|
||||||
@ -579,7 +579,7 @@ MakeTargetlistExpr(ParseState *pstate,
|
|||||||
{
|
{
|
||||||
Oid type_id,
|
Oid type_id,
|
||||||
attrtype;
|
attrtype;
|
||||||
int16 type_mod,
|
int32 type_mod,
|
||||||
attrtypmod;
|
attrtypmod;
|
||||||
int resdomno;
|
int resdomno;
|
||||||
Relation rd;
|
Relation rd;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
/* Given a type structure and a string, returns the internal form of
|
||||||
that string */
|
that string */
|
||||||
char *
|
char *
|
||||||
stringTypeString(Type tp, char *string, int16 atttypmod)
|
stringTypeString(Type tp, char *string, int32 atttypmod)
|
||||||
{
|
{
|
||||||
Oid op;
|
Oid op;
|
||||||
Oid typelem;
|
Oid typelem;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 int _ArrayCount(char *str, int dim[], int typdelim);
|
||||||
static char *
|
static char *
|
||||||
_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
|
_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 typdelim, int typlen, bool typbyval,
|
||||||
char typalign, int *nbytes);
|
char typalign, int *nbytes);
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ static char *array_seek(char *ptr, int eltsize, int nitems);
|
|||||||
char *
|
char *
|
||||||
array_in(char *string, /* input array in external form */
|
array_in(char *string, /* input array in external form */
|
||||||
Oid element_type, /* type OID of an array element */
|
Oid element_type, /* type OID of an array element */
|
||||||
int16 typmod)
|
int32 typmod)
|
||||||
{
|
{
|
||||||
int typlen;
|
int typlen;
|
||||||
bool typbyval,
|
bool typbyval,
|
||||||
@ -360,7 +360,7 @@ _ReadArrayStr(char *arrayStr,
|
|||||||
FmgrInfo *inputproc, /* function used for the
|
FmgrInfo *inputproc, /* function used for the
|
||||||
* conversion */
|
* conversion */
|
||||||
Oid typelem,
|
Oid typelem,
|
||||||
int16 typmod,
|
int32 typmod,
|
||||||
char typdelim,
|
char typdelim,
|
||||||
int typlen,
|
int typlen,
|
||||||
bool typbyval,
|
bool typbyval,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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.)
|
* because we pass typelem as the second argument for array_in.)
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
bpcharin(char *s, int dummy, int16 atttypmod)
|
bpcharin(char *s, int dummy, int32 atttypmod)
|
||||||
{
|
{
|
||||||
char *result,
|
char *result,
|
||||||
*r;
|
*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.)
|
* because we pass typelem as the second argument for array_in.)
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
varcharin(char *s, int dummy, int16 atttypmod)
|
varcharin(char *s, int dummy, int32 atttypmod)
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
int len;
|
int len;
|
||||||
|
6
src/backend/utils/cache/lsyscache.c
vendored
6
src/backend/utils/cache/lsyscache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* Eventually, the index information should go through here, too.
|
* 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.
|
* return the "atttypmod" field from the attribute relation.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int16
|
int32
|
||||||
get_atttypmod(Oid relid, AttrNumber attnum)
|
get_atttypmod(Oid relid, AttrNumber attnum)
|
||||||
{
|
{
|
||||||
FormData_pg_attribute att_tup;
|
FormData_pg_attribute att_tup;
|
||||||
@ -169,7 +169,7 @@ get_atttypmod(Oid relid, AttrNumber attnum)
|
|||||||
if (SearchSysCacheStruct(ATTNUM,
|
if (SearchSysCacheStruct(ATTNUM,
|
||||||
(char *) &att_tup,
|
(char *) &att_tup,
|
||||||
ObjectIdGetDatum(relid),
|
ObjectIdGetDatum(relid),
|
||||||
UInt16GetDatum(attnum),
|
Int32GetDatum(attnum),
|
||||||
0, 0))
|
0, 0))
|
||||||
return att_tup.atttypmod;
|
return att_tup.atttypmod;
|
||||||
else
|
else
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: tupdesc.h,v 1.16 1998/02/26 04:40:31 momjian Exp $
|
* $Id: tupdesc.h,v 1.17 1998/07/12 21:29:26 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -70,7 +70,7 @@ TupleDescInitEntry(TupleDesc desc,
|
|||||||
AttrNumber attributeNumber,
|
AttrNumber attributeNumber,
|
||||||
char *attributeName,
|
char *attributeName,
|
||||||
Oid typeid,
|
Oid typeid,
|
||||||
int16 typmod,
|
int32 typmod,
|
||||||
int attdim,
|
int attdim,
|
||||||
bool attisset);
|
bool attisset);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_attribute.h,v 1.32 1998/03/07 04:49:57 momjian Exp $
|
* $Id: pg_attribute.h,v 1.33 1998/07/12 21:29:28 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
@ -86,7 +86,7 @@ CATALOG(pg_attribute) BOOTSTRAP
|
|||||||
* This speeds up the attribute walking process.
|
* This speeds up the attribute walking process.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int2 atttypmod;
|
int4 atttypmod;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* atttypmod records type-specific modifications supplied at table
|
* atttypmod records type-specific modifications supplied at table
|
||||||
@ -323,7 +323,7 @@ DATA(insert OID = 0 ( 1261 cmax 29 0 4 -6 0 -1 -1 t f i f f));
|
|||||||
{ 1249, {"attnum"}, 21, 0, 2, 6, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
|
{ 1249, {"attnum"}, 21, 0, 2, 6, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
|
||||||
{ 1249, {"attnelems"}, 23, 0, 4, 7, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
|
{ 1249, {"attnelems"}, 23, 0, 4, 7, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
|
||||||
{ 1249, {"attcacheoff"}, 23, 0, 4, 8, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
|
{ 1249, {"attcacheoff"}, 23, 0, 4, 8, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
|
||||||
{ 1249, {"atttypmod"}, 21, 0, 2, 9, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
|
{ 1249, {"atttypmod"}, 21, 0, 4, 9, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
|
||||||
{ 1249, {"attbyval"}, 16, 0, 1, 10, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
|
{ 1249, {"attbyval"}, 16, 0, 1, 10, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
|
||||||
{ 1249, {"attisset"}, 16, 0, 1, 11, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
|
{ 1249, {"attisset"}, 16, 0, 1, 11, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
|
||||||
{ 1249, {"attalign"}, 18, 0, 1, 12, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
|
{ 1249, {"attalign"}, 18, 0, 1, 12, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
|
||||||
@ -338,7 +338,7 @@ DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 -1 t f s f f));
|
|||||||
DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 -1 t f s f f));
|
DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 -1 t f s f f));
|
||||||
DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 -1 t f i f f));
|
DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 -1 t f i f f));
|
||||||
DATA(insert OID = 0 ( 1249 attcacheoff 23 0 4 8 0 -1 -1 t f i f f));
|
DATA(insert OID = 0 ( 1249 attcacheoff 23 0 4 8 0 -1 -1 t f i f f));
|
||||||
DATA(insert OID = 0 ( 1249 atttypmod 21 0 2 9 0 -1 -1 t f s f f));
|
DATA(insert OID = 0 ( 1249 atttypmod 21 0 4 9 0 -1 -1 t f s f f));
|
||||||
DATA(insert OID = 0 ( 1249 attbyval 16 0 1 10 0 -1 -1 t f c f f));
|
DATA(insert OID = 0 ( 1249 attbyval 16 0 1 10 0 -1 -1 t f c f f));
|
||||||
DATA(insert OID = 0 ( 1249 attisset 16 0 1 11 0 -1 -1 t f c f f));
|
DATA(insert OID = 0 ( 1249 attisset 16 0 1 11 0 -1 -1 t f c f f));
|
||||||
DATA(insert OID = 0 ( 1249 attalign 18 0 1 12 0 -1 -1 t f c f f));
|
DATA(insert OID = 0 ( 1249 attalign 18 0 1 12 0 -1 -1 t f c f f));
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: makefuncs.h,v 1.11 1998/02/26 04:41:56 momjian Exp $
|
* $Id: makefuncs.h,v 1.12 1998/07/12 21:29:31 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -27,7 +27,7 @@ extern Var *
|
|||||||
makeVar(Index varno,
|
makeVar(Index varno,
|
||||||
AttrNumber varattno,
|
AttrNumber varattno,
|
||||||
Oid vartype,
|
Oid vartype,
|
||||||
int16 vartypmod,
|
int32 vartypmod,
|
||||||
Index varlevelsup,
|
Index varlevelsup,
|
||||||
Index varnoold,
|
Index varnoold,
|
||||||
AttrNumber varoattno);
|
AttrNumber varoattno);
|
||||||
@ -35,7 +35,7 @@ makeVar(Index varno,
|
|||||||
extern Resdom *
|
extern Resdom *
|
||||||
makeResdom(AttrNumber resno,
|
makeResdom(AttrNumber resno,
|
||||||
Oid restype,
|
Oid restype,
|
||||||
int16 restypmod,
|
int32 restypmod,
|
||||||
char *resname,
|
char *resname,
|
||||||
Index reskey,
|
Index reskey,
|
||||||
Oid reskeyop,
|
Oid reskeyop,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: parsenodes.h,v 1.49 1998/02/26 04:41:59 momjian Exp $
|
* $Id: parsenodes.h,v 1.50 1998/07/12 21:29:31 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -644,7 +644,7 @@ typedef struct TypeName
|
|||||||
char *name; /* name of the type */
|
char *name; /* name of the type */
|
||||||
bool timezone; /* timezone specified? */
|
bool timezone; /* timezone specified? */
|
||||||
bool setof; /* is a set? */
|
bool setof; /* is a set? */
|
||||||
int16 typmod; /* type modifier */
|
int32 typmod; /* type modifier */
|
||||||
List *arrayBounds; /* array bounds */
|
List *arrayBounds; /* array bounds */
|
||||||
} TypeName;
|
} TypeName;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: primnodes.h,v 1.21 1998/02/26 04:42:02 momjian Exp $
|
* $Id: primnodes.h,v 1.22 1998/07/12 21:29:33 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ typedef struct Resdom
|
|||||||
NodeTag type;
|
NodeTag type;
|
||||||
AttrNumber resno;
|
AttrNumber resno;
|
||||||
Oid restype;
|
Oid restype;
|
||||||
int16 restypmod;
|
int32 restypmod;
|
||||||
char *resname;
|
char *resname;
|
||||||
Index reskey;
|
Index reskey;
|
||||||
Oid reskeyop;
|
Oid reskeyop;
|
||||||
@ -124,7 +124,7 @@ typedef struct Var
|
|||||||
Index varno;
|
Index varno;
|
||||||
AttrNumber varattno;
|
AttrNumber varattno;
|
||||||
Oid vartype;
|
Oid vartype;
|
||||||
int16 vartypmod;
|
int32 vartypmod;
|
||||||
Index varlevelsup; /* erased by upper optimizer */
|
Index varlevelsup; /* erased by upper optimizer */
|
||||||
Index varnoold; /* only used by optimizer */
|
Index varnoold; /* only used by optimizer */
|
||||||
AttrNumber varoattno; /* only used by optimizer */
|
AttrNumber varoattno; /* only used by optimizer */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: parse_expr.h,v 1.8 1998/02/26 04:42:41 momjian Exp $
|
* $Id: parse_expr.h,v 1.9 1998/07/12 21:29:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -21,6 +21,6 @@
|
|||||||
extern Node *transformExpr(ParseState *pstate, Node *expr, int precedence);
|
extern Node *transformExpr(ParseState *pstate, Node *expr, int precedence);
|
||||||
extern Node *transformIdent(ParseState *pstate, Node *expr, int precedence);
|
extern Node *transformIdent(ParseState *pstate, Node *expr, int precedence);
|
||||||
extern Oid exprType(Node *expr);
|
extern Oid exprType(Node *expr);
|
||||||
extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int16 attypmod);
|
extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int32 attypmod);
|
||||||
|
|
||||||
#endif /* PARSE_EXPR_H */
|
#endif /* PARSE_EXPR_H */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: parse_type.h,v 1.6 1998/02/26 04:42:50 momjian Exp $
|
* $Id: parse_type.h,v 1.7 1998/07/12 21:29:35 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -26,7 +26,7 @@ extern int16 typeLen(Type t);
|
|||||||
extern bool typeByVal(Type t);
|
extern bool typeByVal(Type t);
|
||||||
extern char *typeTypeName(Type t);
|
extern char *typeTypeName(Type t);
|
||||||
extern char typeTypeFlag(Type t);
|
extern char typeTypeFlag(Type t);
|
||||||
extern char *stringTypeString(Type tp, char *string, int16 atttypmod);
|
extern char *stringTypeString(Type tp, char *string, int32 atttypmod);
|
||||||
extern Oid typeidOutfunc(Oid type_id);
|
extern Oid typeidOutfunc(Oid type_id);
|
||||||
extern Oid typeidTypeRelid(Oid type_id);
|
extern Oid typeidTypeRelid(Oid type_id);
|
||||||
extern Oid typeTypeRelid(Type typ);
|
extern Oid typeTypeRelid(Type typ);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: array.h,v 1.11 1998/02/26 04:43:45 momjian Exp $
|
* $Id: array.h,v 1.12 1998/07/12 21:29:38 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* XXX the data array should be LONGALIGN'd -- notice that the array
|
* XXX the data array should be LONGALIGN'd -- notice that the array
|
||||||
@ -114,7 +114,7 @@ typedef struct
|
|||||||
/*
|
/*
|
||||||
* prototypes for functions defined in arrayfuncs.c
|
* prototypes for functions defined in arrayfuncs.c
|
||||||
*/
|
*/
|
||||||
extern char *array_in(char *string, Oid element_type, int16 typmod);
|
extern char *array_in(char *string, Oid element_type, int32 typmod);
|
||||||
extern char *array_out(ArrayType *v, Oid element_type);
|
extern char *array_out(ArrayType *v, Oid element_type);
|
||||||
extern char *array_dims(ArrayType *v, bool *isNull);
|
extern char *array_dims(ArrayType *v, bool *isNull);
|
||||||
extern Datum
|
extern Datum
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: builtins.h,v 1.45 1998/07/08 14:10:30 thomas Exp $
|
* $Id: builtins.h,v 1.46 1998/07/12 21:29:38 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This should normally only be included by fmgr.h.
|
* This should normally only be included by fmgr.h.
|
||||||
@ -395,7 +395,7 @@ DateTime *timestamp_datetime(time_t timestamp);
|
|||||||
time_t datetime_timestamp(DateTime *datetime);
|
time_t datetime_timestamp(DateTime *datetime);
|
||||||
|
|
||||||
/* varchar.c */
|
/* varchar.c */
|
||||||
extern char *bpcharin(char *s, int dummy, int16 atttypmod);
|
extern char *bpcharin(char *s, int dummy, int32 atttypmod);
|
||||||
extern char *bpcharout(char *s);
|
extern char *bpcharout(char *s);
|
||||||
extern char *bpchar(char *s, int32 slen);
|
extern char *bpchar(char *s, int32 slen);
|
||||||
extern char *char_bpchar(int32 c);
|
extern char *char_bpchar(int32 c);
|
||||||
@ -413,7 +413,7 @@ extern int32 bpcharlen(char *arg);
|
|||||||
extern int32 bpcharoctetlen(char *arg);
|
extern int32 bpcharoctetlen(char *arg);
|
||||||
extern uint32 hashbpchar(struct varlena * key);
|
extern uint32 hashbpchar(struct varlena * key);
|
||||||
|
|
||||||
extern char *varcharin(char *s, int dummy, int16 atttypmod);
|
extern char *varcharin(char *s, int dummy, int32 atttypmod);
|
||||||
extern char *varcharout(char *s);
|
extern char *varcharout(char *s);
|
||||||
extern char *varchar(char *s, int32 slen);
|
extern char *varchar(char *s, int32 slen);
|
||||||
extern bool varchareq(char *arg1, char *arg2);
|
extern bool varchareq(char *arg1, char *arg2);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: lsyscache.h,v 1.10 1998/02/26 04:44:07 momjian Exp $
|
* $Id: lsyscache.h,v 1.11 1998/07/12 21:29:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -21,7 +21,7 @@ extern char *get_attname(Oid relid, AttrNumber attnum);
|
|||||||
extern AttrNumber get_attnum(Oid relid, char *attname);
|
extern AttrNumber get_attnum(Oid relid, char *attname);
|
||||||
extern Oid get_atttype(Oid relid, AttrNumber attnum);
|
extern Oid get_atttype(Oid relid, AttrNumber attnum);
|
||||||
extern bool get_attisset(Oid relid, char *attname);
|
extern bool get_attisset(Oid relid, char *attname);
|
||||||
extern int16 get_atttypmod(Oid relid, AttrNumber attnum);
|
extern int32 get_atttypmod(Oid relid, AttrNumber attnum);
|
||||||
extern RegProcedure get_opcode(Oid opid);
|
extern RegProcedure get_opcode(Oid opid);
|
||||||
extern char *get_opname(Oid opid);
|
extern char *get_opname(Oid opid);
|
||||||
extern bool
|
extern bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user