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
9e4798ea
Commit
9e4798ea
authored
Mar 15, 1997
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A couple of development scripts by Dan to detect unused and duplicate
oids
parent
e8466b03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
src/include/catalog/duplicate_oids
src/include/catalog/duplicate_oids
+20
-0
src/include/catalog/unused_oids
src/include/catalog/unused_oids
+41
-0
No files found.
src/include/catalog/duplicate_oids
0 → 100755
View file @
9e4798ea
#!/bin/sh
#
# duplicate_oids
#
# finds oids that are duplicated in the system tables.
#
egrep
'^DATA'
pg_
*
.h |
\
sed
-e
's/^.*OID[^=]*=[^0-9]*//'
-e
's/[^0-9].*$//'
|
\
sort
-n
>
/tmp/alloids.
$$
uniq
/tmp/alloids.
$$
>
/tmp/uniqoids.
$$
diff
-u
/tmp/alloids.
$$
/tmp/uniqoids.
$$
|
\
grep
-v
'/tmp/'
|
\
grep
'^-'
|
\
sed
-e
's/^-//'
|
\
grep
-v
'^0$'
|
\
uniq
rm
/tmp/alloids.
$$
rm
/tmp/uniqoids.
$$
src/include/catalog/unused_oids
0 → 100755
View file @
9e4798ea
#!/bin/sh
# unused_oids
#
# $Header: /cvsroot/pgsql/src/include/catalog/unused_oids,v 1.1 1997/03/15 06:03:08 scrappy Exp $
#
# finds blocks of oids that have not already been claimed by
# post_hackers for internal purposes. primarily useful for
# finding valid oids for new internal function oids. the numbers
# printed are inclusive ranges of valid (unused) oids.
#
# before using a large empty block, make sure you aren't about
# to take over what was intended as expansion space for something
# else. also, before using a number, do a "grepsrc" to make sure
# that someone isn't using a literal numeric constant somewhere..
#
# non-berkeley post_hackers should probably not try to use oids
# less than the highest one that comes with the distributed source.
#
# run this script in src/backend/catalog.
#
egrep
'^DATA'
pg_
*
.h |
\
sed
-e
's/^.*OID[^=]*=[^0-9]*//'
-e
's/[^0-9].*$//'
|
\
sort
-n
|
\
uniq
|
\
awk
'
BEGIN {
last = 0;
}
/^[0-9]/ {
if ($1 > last + 1) {
if ($1 > last + 2) {
print last + 1, "-", $1 - 1;
} else {
print last + 1;
}
}
last = $1;
}
END {
print last + 1, "-";
}'
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