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
acbbeffc
Commit
acbbeffc
authored
Sep 23, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up some ugly coding (hardwired constants) in index_formtuple.
parent
33e5a4df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
src/backend/access/common/indextuple.c
src/backend/access/common/indextuple.c
+14
-12
No files found.
src/backend/access/common/indextuple.c
View file @
acbbeffc
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.4
4 2000/07/22 11:18:45 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.4
5 2000/09/23 22:40:12 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -46,8 +46,8 @@ index_formtuple(TupleDesc tupleDescriptor,
uint16
tupmask
=
0
;
int
numberOfAttributes
=
tupleDescriptor
->
natts
;
#ifdef TOAST_INDEX_HACK
Datum
untoasted_value
[
MaxHeapAttributeNumber
];
bool
untoasted_free
[
MaxHeapAttributeNumber
];
Datum
untoasted_value
[
INDEX_MAX_KEYS
];
bool
untoasted_free
[
INDEX_MAX_KEYS
];
#endif
if
(
numberOfAttributes
>
INDEX_MAX_KEYS
)
...
...
@@ -79,10 +79,14 @@ index_formtuple(TupleDesc tupleDescriptor,
}
}
#endif
for
(
i
=
0
;
i
<
numberOfAttributes
&&
!
hasnull
;
i
++
)
for
(
i
=
0
;
i
<
numberOfAttributes
;
i
++
)
{
if
(
null
[
i
]
!=
' '
)
{
hasnull
=
true
;
break
;
}
}
if
(
hasnull
)
...
...
@@ -122,23 +126,21 @@ index_formtuple(TupleDesc tupleDescriptor,
/*
* We do this because DataFill wants to initialize a "tupmask" which
* is used for HeapTuples, but we want an indextuple infomask. The
* only
"relevent" info is the "has variable attributes" field, which
*
is in mask position 0x02. We have already set the null mask
above.
* only
relevant info is the "has variable attributes" field.
*
We have already set the hasnull bit
above.
*/
if
(
tupmask
&
0x02
)
if
(
tupmask
&
HEAP_HASVARLENA
)
infomask
|=
INDEX_VAR_MASK
;
/*
* Here we make sure that we can actually hold the size. We also want
* to make sure that size is not aligned oddly. This actually is a
* rather odd way to make sure the size is not too large overall.
* Here we make sure that the size will fit in the field reserved for
* it in t_info.
*/
if
(
size
&
0xE000
)
if
(
(
size
&
INDEX_SIZE_MASK
)
!=
size
)
elog
(
ERROR
,
"index_formtuple: data takes %d bytes: too big"
,
size
);
infomask
|=
size
;
/* ----------------
...
...
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