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
24a05f5b
Commit
24a05f5b
authored
27 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Fix for regproc
parent
50676b40
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/backend/optimizer/util/clauses.c
+3
-2
3 additions, 2 deletions
src/backend/optimizer/util/clauses.c
src/backend/utils/adt/regproc.c
+25
-15
25 additions, 15 deletions
src/backend/utils/adt/regproc.c
src/include/utils/builtins.h
+2
-2
2 additions, 2 deletions
src/include/utils/builtins.h
with
30 additions
and
19 deletions
src/backend/optimizer/util/clauses.c
+
3
−
2
View file @
24a05f5b
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.2
1
1998/08/31 07:
19:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.2
2
1998/08/31 07:
55:47
momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -199,7 +199,8 @@ bool
or_clause
(
Node
*
clause
)
{
return
clause
!=
NULL
&&
nodeTag
(
clause
)
==
T_Expr
&&
((
Expr
*
)
clause
)
->
opType
==
OR_EXPR
);
nodeTag
(
clause
)
==
T_Expr
&&
((
Expr
*
)
clause
)
->
opType
==
OR_EXPR
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/regproc.c
+
25
−
15
View file @
24a05f5b
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.2
3
1998/08/31 07:
3
5:4
4
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.2
4
1998/08/31 07:
5
5:4
8
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -35,12 +35,12 @@
* proid of NULL signifies unknown
*/
int32
regprocin
(
char
*
pro_
oid_
name
)
regprocin
(
char
*
pro_name
_and_oid
)
{
HeapTuple
proctup
;
HeapTuple
proctup
=
NULL
;
RegProcedure
result
=
(
Oid
)
0
;
if
(
pro_
oid_
name
==
NULL
)
if
(
pro_name
_and_oid
==
NULL
)
return
(
0
);
...
...
@@ -48,15 +48,25 @@ regprocin(char *pro_oid_name)
{
/*
* we need to use the oid because there can be multiple entries
* with the same name
, i.e.
1323_int4eq
* with the same name
. We accept
1323_int4eq
and 1323.
*/
if
(
strrchr
(
pro_name_and_oid
,
'_'
)
!=
NULL
)
{
proctup
=
SearchSysCacheTuple
(
PROOID
,
ObjectIdGetDatum
(
atoi
(
strrchr
(
pro_name_and_oid
,
'_'
)
+
1
)),
0
,
0
,
0
);
}
else
if
(
atoi
(
pro_name_and_oid
)
!=
InvalidOid
)
{
proctup
=
SearchSysCacheTuple
(
PROOID
,
/* atoi stops at the _ */
ObjectIdGetDatum
(
atoi
(
pro_
oid_
name
)),
ObjectIdGetDatum
(
atoi
(
pro_name
_and_oid
)),
0
,
0
,
0
);
}
if
(
HeapTupleIsValid
(
proctup
))
result
=
(
RegProcedure
)
proctup
->
t_oid
;
else
result
=
(
RegProcedure
)
0
;
else
elog
(
ERROR
,
"regprocin: no such procedure %s"
,
pro_name_and_oid
)
;
}
else
{
...
...
@@ -76,7 +86,7 @@ regprocin(char *pro_oid_name)
(
bits16
)
0
,
(
AttrNumber
)
1
,
(
RegProcedure
)
F_NAMEEQ
,
(
Datum
)
pro_
oid_
name
);
(
Datum
)
pro_name
_and_oid
);
procscan
=
heap_beginscan
(
proc
,
0
,
SnapshotNow
,
1
,
&
key
);
if
(
!
HeapScanIsValid
(
procscan
))
...
...
@@ -94,7 +104,7 @@ regprocin(char *pro_oid_name)
RelationGetTupleDescriptor
(
proc
),
&
isnull
);
if
(
isnull
)
elog
(
FATAL
,
"regprocin: null procedure %s"
,
pro_
oid_
name
);
elog
(
FATAL
,
"regprocin: null procedure %s"
,
pro_name
_and_oid
);
}
else
result
=
(
RegProcedure
)
0
;
...
...
@@ -104,13 +114,13 @@ regprocin(char *pro_oid_name)
}
#ifdef EBUG
elog
(
DEBUG
,
"regprocin: no such procedure %s"
,
pro_
oid_
name
);
elog
(
DEBUG
,
"regprocin: no such procedure %s"
,
pro_name
_and_oid
);
#endif
/* defined(EBUG) */
return
(
int32
)
result
;
}
/*
* regprocout - converts proid to "pro_
oid_
name"
* regprocout - converts proid to "pro_name
_and_oid
"
*/
char
*
regprocout
(
RegProcedure
proid
)
...
...
@@ -131,7 +141,7 @@ regprocout(RegProcedure proid)
char
*
s
;
s
=
((
Form_pg_proc
)
GETSTRUCT
(
proctup
))
->
proname
.
data
;
snprintf
(
result
,
NAMEDATALEN
,
"%
d
_%
s
"
,
proid
,
s
);
snprintf
(
result
,
NAMEDATALEN
,
"%
s
_%
d
"
,
s
,
proid
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/include/utils/builtins.h
+
2
−
2
View file @
24a05f5b
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.4
8
1998/08/
29 04:09:29
momjian Exp $
* $Id: builtins.h,v 1.4
9
1998/08/
31 07:55:50
momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
...
...
@@ -356,7 +356,7 @@ extern bool texticregexne(struct varlena * s, struct varlena * p);
/* regproc.c */
extern
int32
regprocin
(
char
*
proname
);
extern
int32
regprocin
(
char
*
pro
_
name
_and_oid
);
extern
char
*
regprocout
(
RegProcedure
proid
);
extern
text
*
oid8types
(
Oid
(
*
oidArray
)[]);
extern
Oid
regproctooid
(
RegProcedure
rp
);
...
...
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