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
5c2fb2a1
Commit
5c2fb2a1
authored
Jan 11, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use symbolic INDEX_MAX_KEYS in pg_type entries for oidvector
and int2vector.
parent
c2fa275d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
src/backend/catalog/genbki.sh.in
src/backend/catalog/genbki.sh.in
+18
-2
src/include/catalog/pg_type.h
src/include/catalog/pg_type.h
+5
-5
No files found.
src/backend/catalog/genbki.sh.in
View file @
5c2fb2a1
...
...
@@ -10,7 +10,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh.in,v 1.
4 1999/11/04 08:00:56 inoue
Exp $
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh.in,v 1.
5 2000/01/11 04:02:28 tgl
Exp $
#
# NOTES
# non-essential whitespace is removed from the generated file.
...
...
@@ -53,7 +53,17 @@ while test $x -le $numargs ; do
done
# Get NAMEDATALEN from postgres_ext.h
NAMEDATALEN
=
`
grep
'#define.*NAMEDATALEN'
../../include/postgres_ext.h |
awk
'{ print $3 }'
`
NAMEDATALEN
=
`
grep
'#define[ ]*NAMEDATALEN'
../../include/postgres_ext.h |
awk
'{ print $3 }'
`
# Get INDEX_MAX_KEYS from config.h (who needs consistency?)
INDEXMAXKEYS
=
`
grep
'#define[ ]*INDEX_MAX_KEYS'
../../include/config.h |
awk
'{ print $3 }'
`
# NOTE: we assume here that FUNC_MAX_ARGS has the same value as INDEX_MAX_KEYS,
# and don't read it separately from config.h. This is OK because both of them
# must be equal to the length of oidvector.
INDEXMAXKEYS2
=
`
expr
$INDEXMAXKEYS
'*'
2
`
INDEXMAXKEYS4
=
`
expr
$INDEXMAXKEYS
'*'
4
`
# ----------------
# strip comments and trash from .h before we generate
...
...
@@ -80,6 +90,12 @@ sed -e "s/;[ ]*$//g" \
-e
"s/(NameData/(name/g"
\
-e
"s/(Oid/(oid/g"
\
-e
"s/NAMEDATALEN/
$NAMEDATALEN
/g"
\
-e
"s/INDEX_MAX_KEYS
\*
2/
$INDEXMAXKEYS2
/g"
\
-e
"s/INDEX_MAX_KEYS
\*
4/
$INDEXMAXKEYS4
/g"
\
-e
"s/INDEX_MAX_KEYS/
$INDEXMAXKEYS
/g"
\
-e
"s/FUNC_MAX_ARGS
\*
2/
$INDEXMAXKEYS2
/g"
\
-e
"s/FUNC_MAX_ARGS
\*
4/
$INDEXMAXKEYS4
/g"
\
-e
"s/FUNC_MAX_ARGS/
$INDEXMAXKEYS
/g"
\
|
awk
'
# ----------------
# now use awk to process remaining .h file..
...
...
src/include/catalog/pg_type.h
View file @
5c2fb2a1
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.7
4 2000/01/10 20:23:31 momjian
Exp $
* $Id: pg_type.h,v 1.7
5 2000/01/11 04:02:28 tgl
Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -174,8 +174,8 @@ DATA(insert OID = 21 ( int2 PGUID 2 5 t b t \054 0 0 int2in int2out int2
DESCR
(
"-32 thousand to 32 thousand, 2-byte storage"
);
#define INT2OID 21
DATA
(
insert
OID
=
22
(
int2vector
PGUID
32
113
f
b
t
\
054
0
21
int2vectorin
int2vectorout
int2vectorin
int2vectorout
i
_null_
));
DESCR
(
"
16 int2 integers, used internally
"
);
DATA
(
insert
OID
=
22
(
int2vector
PGUID
INDEX_MAX_KEYS
*
2
-
1
f
b
t
\
054
0
21
int2vectorin
int2vectorout
int2vectorin
int2vectorout
i
_null_
));
DESCR
(
"
array of INDEX_MAX_KEYS int2 integers, used in system tables
"
);
/*
* XXX -- the implementation of int2vector's in postgres is a hack, and will
* go away someday. until that happens, there is a case (in the
...
...
@@ -213,8 +213,8 @@ DATA(insert OID = 29 ( cid PGUID 4 10 t b t \054 0 0 cidin cidout cidin
DESCR
(
"command identifier type, sequence in transaction id"
);
#define CIDOID 29
DATA
(
insert
OID
=
30
(
oidvector
PGUID
64
193
f
b
t
\
054
0
26
oidvectorin
oidvectorout
oidvectorin
oidvectorout
i
_null_
));
DESCR
(
"array of
16
oids, used in system tables"
);
DATA
(
insert
OID
=
30
(
oidvector
PGUID
INDEX_MAX_KEYS
*
4
-
1
f
b
t
\
054
0
26
oidvectorin
oidvectorout
oidvectorin
oidvectorout
i
_null_
));
DESCR
(
"array of
INDEX_MAX_KEYS
oids, used in system tables"
);
DATA
(
insert
OID
=
32
(
SET
PGUID
-
1
-
1
f
b
t
\
054
0
0
textin
textout
textin
textout
i
_null_
));
DESCR
(
"set of tuples"
);
...
...
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