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
c0dd20f9
Commit
c0dd20f9
authored
Sep 01, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
b9cbb1ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
src/backend/catalog/indexing.c
src/backend/catalog/indexing.c
+13
-15
No files found.
src/backend/catalog/indexing.c
View file @
c0dd20f9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2
8 1998/09/01 06:51:35
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2
9 1998/09/01 16:21:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -106,9 +106,9 @@ CatalogIndexInsert(Relation *idescs,
Relation
heapRelation
,
HeapTuple
heapTuple
)
{
HeapTuple
pgIndexT
up
;
HeapTuple
index_t
up
;
TupleDesc
heapDescriptor
;
Form_pg_index
pgIndexP
;
Form_pg_index
index_form
;
Datum
datum
;
int
natts
;
AttrNumber
*
attnumP
;
...
...
@@ -123,25 +123,25 @@ CatalogIndexInsert(Relation *idescs,
{
InsertIndexResult
indexRes
;
pgIndexT
up
=
SearchSysCacheTupleCopy
(
INDEXRELID
,
index_t
up
=
SearchSysCacheTupleCopy
(
INDEXRELID
,
ObjectIdGetDatum
(
idescs
[
i
]
->
rd_id
),
0
,
0
,
0
);
Assert
(
pgIndexT
up
);
pgIndexP
=
(
Form_pg_index
)
GETSTRUCT
(
pgIndexT
up
);
Assert
(
index_t
up
);
index_form
=
(
Form_pg_index
)
GETSTRUCT
(
index_t
up
);
/*
* Compute the number of attributes we are indexing upon.
*/
for
(
attnumP
=
pgIndexP
->
indkey
,
natts
=
0
;
for
(
attnumP
=
index_form
->
indkey
,
natts
=
0
;
*
attnumP
!=
InvalidAttrNumber
;
attnumP
++
,
natts
++
)
;
if
(
pgIndexP
->
indproc
!=
InvalidOid
)
if
(
index_form
->
indproc
!=
InvalidOid
)
{
FIgetnArgs
(
&
finfo
)
=
natts
;
natts
=
1
;
FIgetProcOid
(
&
finfo
)
=
pgIndexP
->
indproc
;
FIgetProcOid
(
&
finfo
)
=
index_form
->
indproc
;
*
(
FIgetname
(
&
finfo
))
=
'\0'
;
finfoP
=
&
finfo
;
}
...
...
@@ -149,7 +149,7 @@ CatalogIndexInsert(Relation *idescs,
finfoP
=
(
FuncIndexInfo
*
)
NULL
;
FormIndexDatum
(
natts
,
(
AttrNumber
*
)
pgIndexP
->
indkey
,
(
AttrNumber
*
)
index_form
->
indkey
,
heapTuple
,
heapDescriptor
,
&
datum
,
...
...
@@ -160,7 +160,7 @@ CatalogIndexInsert(Relation *idescs,
&
heapTuple
->
t_ctid
,
heapRelation
);
if
(
indexRes
)
pfree
(
indexRes
);
pfree
(
pgIndexT
up
);
pfree
(
index_t
up
);
}
}
...
...
@@ -230,10 +230,8 @@ CatalogIndexFetchTuple(Relation heapRelation,
sd
=
index_beginscan
(
idesc
,
false
,
num_keys
,
skey
);
while
((
indexRes
=
index_getnext
(
sd
,
ForwardScanDirection
)))
{
ItemPointer
iptr
;
iptr
=
&
indexRes
->
heap_iptr
;
tuple
=
heap_fetch
(
heapRelation
,
SnapshotNow
,
iptr
,
&
buffer
);
tuple
=
heap_fetch
(
heapRelation
,
SnapshotNow
,
&
indexRes
->
heap_iptr
,
&
buffer
);
pfree
(
indexRes
);
if
(
HeapTupleIsValid
(
tuple
))
break
;
...
...
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