Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
a753e5d1
Commit
a753e5d1
authored
26 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Fix for possible releasebuffer bug.
parent
6c498285
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/catalog/indexing.c
+18
-23
18 additions, 23 deletions
src/backend/catalog/indexing.c
src/backend/parser/scan.c
+16
-12
16 additions, 12 deletions
src/backend/parser/scan.c
with
34 additions
and
35 deletions
src/backend/catalog/indexing.c
+
18
−
23
View file @
a753e5d1
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2
2
1998/08/
2
0 2
2:07:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2
3
1998/08/
3
0 2
3: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
);
ObjectIdGet
Datum
(
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
);
PointerGet
Datum
(
procName
)
)
;
ScanKeyEntryInitialize
(
&
skey
[
1
],
(
bits16
)
0x0
,
...
...
@@ -371,7 +366,7 @@ ProcedureNameIndexScan(Relation heapRelation,
(
bits16
)
0x0
,
(
AttrNumber
)
3
,
(
RegProcedure
)
F_OID8EQ
,
(
Datum
)
argTypes
);
PointerGet
Datum
(
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
);
PointerGet
Datum
(
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
);
ObjectIdGet
Datum
(
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
);
PointerGet
Datum
(
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
);
ObjectIdGet
Datum
(
relId
)
)
;
idesc
=
index_openr
(
ClassOidIndex
);
tuple
=
CatalogIndexFetchTuple
(
heapRelation
,
idesc
,
skey
,
1
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/scan.c
+
16
−
12
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/
2
3 2
2
:25:5
1
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2
5
1998/08/3
0
2
3
:25:5
6
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/
2
3 2
2
:25:5
1
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2
5
1998/08/3
0
2
3
:25:5
6
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
[])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment