Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
65faaf30
Commit
65faaf30
authored
Feb 07, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atttypmod now -1.
parent
ec9d5d71
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
247 additions
and
245 deletions
+247
-245
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+2
-2
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+2
-1
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+7
-7
src/backend/catalog/index.c
src/backend/catalog/index.c
+8
-8
src/backend/commands/sequence.c
src/backend/commands/sequence.c
+1
-1
src/backend/executor/execUtils.c
src/backend/executor/execUtils.c
+2
-1
src/backend/parser/parse_expr.c
src/backend/parser/parse_expr.c
+2
-2
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varchar.c
+3
-3
src/bin/psql/psql.c
src/bin/psql/psql.c
+2
-2
src/include/catalog/pg_attribute.h
src/include/catalog/pg_attribute.h
+218
-218
No files found.
src/backend/access/common/tupdesc.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.3
2 1998/01/16 23:19:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.3
3 1998/02/07 06:10:30
momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
...
...
@@ -301,7 +301,7 @@ TupleDescInitEntry(TupleDesc desc,
att
->
attdisbursion
=
0
;
/* dummy value */
att
->
attcacheoff
=
-
1
;
att
->
atttypmod
=
0
;
att
->
atttypmod
=
-
1
;
att
->
attnum
=
attributeNumber
;
att
->
attnelems
=
attdim
;
...
...
src/backend/bootstrap/bootstrap.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.3
4 1998/02/06 19:18:06
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.3
5 1998/02/07 06:10:34
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -627,6 +627,7 @@ DefineAttr(char *name, char *type, int attnum)
attrtypes
[
attnum
]
->
attbyval
=
(
attlen
==
1
)
||
(
attlen
==
2
)
||
(
attlen
==
4
);
}
attrtypes
[
attnum
]
->
attcacheoff
=
-
1
;
attrtypes
[
attnum
]
->
atttypmod
=
-
1
;
}
...
...
src/backend/catalog/heap.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.4
4 1998/02/05 19:02:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.4
5 1998/02/07 06:10:39
momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
...
...
@@ -97,32 +97,32 @@ static void RemoveConstraints(Relation rel);
static
FormData_pg_attribute
a1
=
{
0xffffffff
,
{
"ctid"
},
27l
,
0l
,
sizeof
(
ItemPointerData
),
SelfItemPointerAttributeNumber
,
0
,
-
1
,
0
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
SelfItemPointerAttributeNumber
,
0
,
-
1
,
-
1
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
FormData_pg_attribute
a2
=
{
0xffffffff
,
{
"oid"
},
26l
,
0l
,
sizeof
(
Oid
),
ObjectIdAttributeNumber
,
0
,
-
1
,
0
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
ObjectIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
FormData_pg_attribute
a3
=
{
0xffffffff
,
{
"xmin"
},
28l
,
0l
,
sizeof
(
TransactionId
),
MinTransactionIdAttributeNumber
,
0
,
-
1
,
0
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
MinTransactionIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
FormData_pg_attribute
a4
=
{
0xffffffff
,
{
"cmin"
},
29l
,
0l
,
sizeof
(
CommandId
),
MinCommandIdAttributeNumber
,
0
,
-
1
,
0
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
MinCommandIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
FormData_pg_attribute
a5
=
{
0xffffffff
,
{
"xmax"
},
28l
,
0l
,
sizeof
(
TransactionId
),
MaxTransactionIdAttributeNumber
,
0
,
-
1
,
0
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
MaxTransactionIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
FormData_pg_attribute
a6
=
{
0xffffffff
,
{
"cmax"
},
29l
,
0l
,
sizeof
(
CommandId
),
MaxCommandIdAttributeNumber
,
0
,
-
1
,
0
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
MaxCommandIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
AttributeTupleForm
HeapAtt
[]
=
...
...
src/backend/catalog/index.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.3
6 1998/01/16 23:19:27
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.3
7 1998/02/07 06:10:49
momjian Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -118,12 +118,12 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
* ----------------------------------------------------------------
*/
static
FormData_pg_attribute
sysatts
[]
=
{
{
0l
,
{
"ctid"
},
27l
,
0l
,
6
,
-
1
,
0
,
-
1
,
0
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"oid"
},
26l
,
0l
,
4
,
-
2
,
0
,
-
1
,
0
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"xmin"
},
28l
,
0l
,
4
,
-
3
,
0
,
-
1
,
0
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"cmin"
},
29l
,
0l
,
4
,
-
4
,
0
,
-
1
,
0
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"xmax"
},
28l
,
0l
,
4
,
-
5
,
0
,
-
1
,
0
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"cmax"
},
29l
,
0l
,
4
,
-
6
,
0
,
-
1
,
0
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"ctid"
},
27l
,
0l
,
6
,
-
1
,
0
,
-
1
,
-
1
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"oid"
},
26l
,
0l
,
4
,
-
2
,
0
,
-
1
,
-
1
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"xmin"
},
28l
,
0l
,
4
,
-
3
,
0
,
-
1
,
-
1
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"cmin"
},
29l
,
0l
,
4
,
-
4
,
0
,
-
1
,
-
1
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"xmax"
},
28l
,
0l
,
4
,
-
5
,
0
,
-
1
,
-
1
,
'\0'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
{
0l
,
{
"cmax"
},
29l
,
0l
,
4
,
-
6
,
0
,
-
1
,
-
1
,
'\001'
,
'\0'
,
'i'
,
'\0'
,
'\0'
},
};
/* ----------------------------------------------------------------
...
...
@@ -437,7 +437,7 @@ ConstructTupleDescriptor(Oid heapoid,
((
AttributeTupleForm
)
to
)
->
attnotnull
=
false
;
((
AttributeTupleForm
)
to
)
->
atthasdef
=
false
;
((
AttributeTupleForm
)
to
)
->
atttypmod
=
0
;
((
AttributeTupleForm
)
to
)
->
atttypmod
=
-
1
;
/*
* if the keytype is defined, we need to change the tuple form's
...
...
src/backend/commands/sequence.c
View file @
65faaf30
...
...
@@ -98,7 +98,7 @@ DefineSequence(CreateSeqStmt *seq)
typnam
=
makeNode
(
TypeName
);
typnam
->
setof
=
FALSE
;
typnam
->
arrayBounds
=
NULL
;
typnam
->
typmod
=
0
;
typnam
->
typmod
=
-
1
;
coldef
=
makeNode
(
ColumnDef
);
coldef
->
typename
=
typnam
;
coldef
->
defval
=
NULL
;
...
...
src/backend/executor/execUtils.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.2
6 1998/01/20 05:03:30
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.2
7 1998/02/07 06:11:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -531,6 +531,7 @@ ExecSetTypeInfo(int index,
att
->
attproc
=
0
;
/* dummy value */
att
->
attnelems
=
0
;
/* dummy value */
att
->
attcacheoff
=
-
1
;
att
->
atttypmod
=
-
1
;
att
->
attisset
=
false
;
att
->
attalign
=
attalign
;
}
...
...
src/backend/parser/parse_expr.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.1
7 1998/02/06 16:46:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.1
8 1998/02/07 06:11:30
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -101,7 +101,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
Value
*
val
=
&
con
->
val
;
if
(
con
->
typename
!=
NULL
)
result
=
parser_typecast
(
val
,
con
->
typename
,
0
);
result
=
parser_typecast
(
val
,
con
->
typename
,
-
1
);
else
result
=
(
Node
*
)
make_const
(
val
);
break
;
...
...
src/backend/utils/adt/varchar.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.2
5 1998/02/05 17:22:41
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.2
6 1998/02/07 06:11:38
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -60,7 +60,7 @@ bpcharin(char *s, int dummy, int atttypmod)
if
(
s
==
NULL
)
return
((
char
*
)
NULL
);
if
(
atttypmod
<
1
)
if
(
atttypmod
==
-
1
)
{
/*
...
...
@@ -133,7 +133,7 @@ varcharin(char *s, int dummy, int atttypmod)
return
((
char
*
)
NULL
);
len
=
strlen
(
s
)
+
VARHDRSZ
;
if
(
atttypmod
>
0
&&
len
>
atttypmod
)
if
(
atttypmod
!=
-
1
&&
len
>
atttypmod
)
len
=
atttypmod
;
/* clip the string at max length */
if
(
len
>
4096
)
...
...
src/bin/psql/psql.c
View file @
65faaf30
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.13
2 1998/02/06 17:46:31
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.13
3 1998/02/07 06:11:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -689,7 +689,7 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
fprintf
(
fout
,
"%6s |"
,
"var"
);
else
if
(
strcmp
(
rtype
,
"bpchar"
)
==
0
||
strcmp
(
rtype
,
"varchar"
)
==
0
)
fprintf
(
fout
,
"%6i |"
,
atttypmod
>
0
?
atttypmod
-
VARHDRSZ
:
0
);
fprintf
(
fout
,
"%6i |"
,
atttypmod
!=
-
1
?
atttypmod
-
VARHDRSZ
:
0
);
else
{
if
(
attlen
>
0
)
...
...
src/include/catalog/pg_attribute.h
View file @
65faaf30
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment