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
a753e5d1
Commit
a753e5d1
authored
Aug 30, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for possible releasebuffer bug.
parent
6c498285
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
35 deletions
+34
-35
src/backend/catalog/indexing.c
src/backend/catalog/indexing.c
+18
-23
src/backend/parser/scan.c
src/backend/parser/scan.c
+16
-12
No files found.
src/backend/catalog/indexing.c
View file @
a753e5d1
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2
2 1998/08/20 22:07:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2
3 1998/08/30 23:25:55
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -227,31 +227,26 @@ CatalogIndexFetchTuple(Relation heapRelation,
{
IndexScanDesc
sd
;
RetrieveIndexResult
indexRes
;
HeapTuple
tuple
;
HeapTuple
tuple
=
NULL
;
Buffer
buffer
;
sd
=
index_beginscan
(
idesc
,
false
,
num_keys
,
skey
);
tuple
=
(
HeapTuple
)
NULL
;
do
{
indexRes
=
index_getnext
(
sd
,
ForwardScanDirection
);
if
(
indexRes
)
while
((
indexRes
=
index_getnext
(
sd
,
ForwardScanDirection
)))
{
ItemPointer
iptr
;
iptr
=
&
indexRes
->
heap_iptr
;
tuple
=
heap_fetch
(
heapRelation
,
SnapshotNow
,
iptr
,
&
buffer
);
pfree
(
indexRes
);
}
else
if
(
HeapTupleIsValid
(
tuple
))
break
;
}
while
(
!
HeapTupleIsValid
(
tuple
));
}
if
(
HeapTupleIsValid
(
tuple
))
{
tuple
=
heap_copytuple
(
tuple
);
if
(
BufferIsValid
(
buffer
))
ReleaseBuffer
(
buffer
);
}
index_endscan
(
sd
);
pfree
(
sd
);
...
...
@@ -333,7 +328,7 @@ ProcedureOidIndexScan(Relation heapRelation, Oid procId)
(
bits16
)
0x0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_OIDEQ
,
(
Datum
)
procId
);
ObjectIdGetDatum
(
procId
)
);
idesc
=
index_openr
(
ProcedureOidIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
1
);
...
...
@@ -359,7 +354,7 @@ ProcedureNameIndexScan(Relation heapRelation,
(
bits16
)
0x0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_NAMEEQ
,
(
Datum
)
procName
);
PointerGetDatum
(
procName
)
);
ScanKeyEntryInitialize
(
&
skey
[
1
],
(
bits16
)
0x0
,
...
...
@@ -371,7 +366,7 @@ ProcedureNameIndexScan(Relation heapRelation,
(
bits16
)
0x0
,
(
AttrNumber
)
3
,
(
RegProcedure
)
F_OID8EQ
,
(
Datum
)
argTypes
);
PointerGetDatum
(
argTypes
)
);
idesc
=
index_openr
(
ProcedureNameIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
3
);
...
...
@@ -394,7 +389,7 @@ ProcedureSrcIndexScan(Relation heapRelation, text *procSrc)
(
bits16
)
0x0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_TEXTEQ
,
(
Datum
)
procSrc
);
PointerGetDatum
(
procSrc
)
);
idesc
=
index_openr
(
ProcedureSrcIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
1
);
...
...
@@ -415,7 +410,7 @@ TypeOidIndexScan(Relation heapRelation, Oid typeId)
(
bits16
)
0x0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_OIDEQ
,
(
Datum
)
typeId
);
ObjectIdGetDatum
(
typeId
)
);
idesc
=
index_openr
(
TypeOidIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
1
);
...
...
@@ -436,7 +431,7 @@ TypeNameIndexScan(Relation heapRelation, char *typeName)
(
bits16
)
0x0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_NAMEEQ
,
(
Datum
)
typeName
);
PointerGetDatum
(
typeName
)
);
idesc
=
index_openr
(
TypeNameIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
1
);
...
...
@@ -477,7 +472,7 @@ ClassOidIndexScan(Relation heapRelation, Oid relId)
(
bits16
)
0x0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_OIDEQ
,
(
Datum
)
relId
);
ObjectIdGetDatum
(
relId
)
);
idesc
=
index_openr
(
ClassOidIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
1
);
...
...
src/backend/parser/scan.c
View file @
a753e5d1
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2
4 1998/08/23 22:25:51
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2
5 1998/08/30 23:25:56
momjian Exp $
*/
#define FLEX_SCANNER
...
...
@@ -555,7 +555,7 @@ char *yytext;
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2
4 1998/08/23 22:25:51
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2
5 1998/08/30 23:25:56
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1181,6 +1181,8 @@ YY_RULE_SETUP
if
(
isascii
((
unsigned
char
)
yytext
[
i
])
&&
isupper
(
yytext
[
i
]))
yytext
[
i
]
=
tolower
(
yytext
[
i
]);
if
(
i
>=
NAMEDATALEN
)
yytext
[
NAMEDATALEN
-
1
]
=
'\0'
;
keyword
=
ScanKeywordLookup
((
char
*
)
yytext
);
if
(
keyword
!=
NULL
)
{
...
...
@@ -1195,7 +1197,7 @@ YY_RULE_SETUP
YY_BREAK
case
34
:
YY_RULE_SETUP
#line 33
7
"scan.l"
#line 33
9
"scan.l"
{
char
*
endptr
;
...
...
@@ -1217,7 +1219,7 @@ YY_RULE_SETUP
YY_BREAK
case
35
:
YY_RULE_SETUP
#line 35
5
"scan.l"
#line 35
7
"scan.l"
{
char
*
endptr
;
...
...
@@ -1232,7 +1234,7 @@ YY_RULE_SETUP
YY_BREAK
case
36
:
YY_RULE_SETUP
#line 36
6
"scan.l"
#line 36
8
"scan.l"
{
char
*
endptr
;
...
...
@@ -1253,7 +1255,7 @@ YY_RULE_SETUP
YY_BREAK
case
37
:
YY_RULE_SETUP
#line 38
3
"scan.l"
#line 38
5
"scan.l"
{
char
*
endptr
;
...
...
@@ -1267,7 +1269,7 @@ YY_RULE_SETUP
YY_BREAK
case
38
:
YY_RULE_SETUP
#line 39
5
"scan.l"
#line 39
7
"scan.l"
{
int
i
;
ScanKeyword
*
keyword
;
...
...
@@ -1276,6 +1278,8 @@ YY_RULE_SETUP
if
(
isascii
((
unsigned
char
)
yytext
[
i
])
&&
isupper
(
yytext
[
i
]))
yytext
[
i
]
=
tolower
(
yytext
[
i
]);
if
(
i
>=
NAMEDATALEN
)
yytext
[
NAMEDATALEN
-
1
]
=
'\0'
;
keyword
=
ScanKeywordLookup
((
char
*
)
yytext
);
if
(
keyword
!=
NULL
)
{
...
...
@@ -1290,20 +1294,20 @@ YY_RULE_SETUP
YY_BREAK
case
39
:
YY_RULE_SETUP
#line 41
4
"scan.l"
#line 41
8
"scan.l"
{
/* ignore */
}
YY_BREAK
case
40
:
YY_RULE_SETUP
#line 4
16
"scan.l"
#line 4
20
"scan.l"
{
return
(
yytext
[
0
]);
}
YY_BREAK
case
41
:
YY_RULE_SETUP
#line 4
18
"scan.l"
#line 4
22
"scan.l"
ECHO
;
YY_BREAK
#line 13
07
"lex.yy.c"
#line 13
11
"lex.yy.c"
case
YY_STATE_EOF
(
INITIAL
):
case
YY_STATE_EOF
(
xb
):
case
YY_STATE_EOF
(
xc
):
...
...
@@ -2189,7 +2193,7 @@ int main()
return
0
;
}
#endif
#line 4
18
"scan.l"
#line 4
22
"scan.l"
void
yyerror
(
char
message
[])
...
...
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