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
25aa0f8d
Commit
25aa0f8d
authored
Aug 21, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New system relations to store DEFAULT/CHECK expressions.
parent
197ced59
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
490 additions
and
345 deletions
+490
-345
src/include/catalog/indexing.h
src/include/catalog/indexing.h
+10
-1
src/include/catalog/pg_attrdef.h
src/include/catalog/pg_attrdef.h
+54
-0
src/include/catalog/pg_attribute.h
src/include/catalog/pg_attribute.h
+342
-317
src/include/catalog/pg_class.h
src/include/catalog/pg_class.h
+26
-24
src/include/catalog/pg_relcheck.h
src/include/catalog/pg_relcheck.h
+53
-0
src/include/catalog/pg_type.h
src/include/catalog/pg_type.h
+5
-3
No files found.
src/include/catalog/indexing.h
View file @
25aa0f8d
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: indexing.h,v 1.
2 1996/11/06 07:05:18 scrappy
Exp $
* $Id: indexing.h,v 1.
3 1997/08/21 01:37:48 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -24,6 +24,8 @@
#define Num_pg_proc_indices 3
#define Num_pg_type_indices 2
#define Num_pg_class_indices 2
#define Num_pg_attrdef_indices 1
#define Num_pg_relcheck_indices 1
/*
...
...
@@ -39,11 +41,15 @@
#define TypeOidIndex "pg_typeidind"
#define ClassNameIndex "pg_classnameind"
#define ClassOidIndex "pg_classoidind"
#define AttrDefaultIndex "pg_attrdefind"
#define RelCheckIndex "pg_relcheckind"
extern
char
*
Name_pg_attr_indices
[];
extern
char
*
Name_pg_proc_indices
[];
extern
char
*
Name_pg_type_indices
[];
extern
char
*
Name_pg_class_indices
[];
extern
char
*
Name_pg_attrdef_indices
[];
extern
char
*
Name_pg_relcheck_indices
[];
extern
char
*
IndexedCatalogNames
[];
...
...
@@ -98,6 +104,9 @@ DECLARE_INDEX(pg_typenameind on pg_type using btree (typname name_ops));
DECLARE_INDEX
(
pg_classnameind
on
pg_class
using
btree
(
relname
name_ops
));
DECLARE_INDEX
(
pg_classoidind
on
pg_class
using
btree
(
Oid
oid_ops
));
DECLARE_INDEX
(
pg_attrdefind
on
pg_attrdef
using
btree
(
adrelid
oid_ops
));
DECLARE_INDEX
(
pg_relcheckind
on
pg_relcheck
using
btree
(
rcrelid
oid_ops
));
/* now build indices in the initialization scripts */
BUILD_INDICES
...
...
src/include/catalog/pg_attrdef.h
0 → 100644
View file @
25aa0f8d
/*-------------------------------------------------------------------------
*
* pg_attrdef.h--
*
*
* Copyright (c) 1994, Regents of the University of California
*
* NOTES
* the genbki.sh script reads this file and generates .bki
* information from the DATA() statements.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_ATTRDEF_H
#define PG_ATTRDEF_H
/* ----------------
* postgres.h contains the system type definintions and the
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
* can be read by both genbki.sh and the C compiler.
* ----------------
*/
/* ----------------
* pg_attrdef definition. cpp turns this into
* typedef struct FormData_pg_attrdef
* ----------------
*/
CATALOG
(
pg_attrdef
)
BOOTSTRAP
{
Oid
adrelid
;
int2
adnum
;
text
adbin
;
text
adsrc
;
}
FormData_pg_attrdef
;
/* ----------------
* Form_pg_attrdef corresponds to a pointer to a tuple with
* the format of pg_attrdef relation.
* ----------------
*/
typedef
FormData_pg_attrdef
*
Form_pg_attrdef
;
/* ----------------
* compiler constants for pg_attrdef
* ----------------
*/
#define Natts_pg_attrdef 4
#define Anum_pg_attrdef_adrelid 1
#define Anum_pg_attrdef_adnum 2
#define Anum_pg_attrdef_adbin 3
#define Anum_pg_attrdef_adsrc 4
#endif
/* PG_ATTRDEF_H */
src/include/catalog/pg_attribute.h
View file @
25aa0f8d
This diff is collapsed.
Click to expand it.
src/include/catalog/pg_class.h
View file @
25aa0f8d
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_class.h,v 1.
5 1997/04/02 03:29:35
vadim Exp $
* $Id: pg_class.h,v 1.
6 1997/08/21 01:37:52
vadim Exp $
*
* NOTES
* ``pg_relation'' is being replaced by ``pg_class''. currently
...
...
@@ -69,8 +69,7 @@ CATALOG(pg_class) BOOTSTRAP {
class which have attnum > 0 (= user attribute).
*/
int2
relsmgr
;
int28
relkey
;
/* not used */
oid8
relkeyop
;
/* not used */
int2
relchecks
;
/* # of CHECK constraints */
bool
relhasrules
;
aclitem
relacl
[
1
];
/* this is here for the catalog */
}
FormData_pg_class
;
...
...
@@ -96,8 +95,8 @@ typedef FormData_pg_class *Form_pg_class;
* relacl field.
* ----------------
*/
#define Natts_pg_class_fixed 1
7
#define Natts_pg_class 1
8
#define Natts_pg_class_fixed 1
6
#define Natts_pg_class 1
7
#define Anum_pg_class_relname 1
#define Anum_pg_class_reltype 2
#define Anum_pg_class_relowner 3
...
...
@@ -112,31 +111,32 @@ typedef FormData_pg_class *Form_pg_class;
#define Anum_pg_class_relarch 12
#define Anum_pg_class_relnatts 13
#define Anum_pg_class_relsmgr 14
#define Anum_pg_class_relkey 15
#define Anum_pg_class_relkeyop 16
#define Anum_pg_class_relhasrules 17
#define Anum_pg_class_relacl 18
#define Anum_pg_class_relchecks 15
#define Anum_pg_class_relhasrules 16
#define Anum_pg_class_relacl 17
/* ----------------
* initial contents of pg_class
* ----------------
*/
DATA
(
insert
OID
=
1247
(
pg_type
71
PGUID
0
0
0
0
0
f
f
r
n
16
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1249
(
pg_attribute
75
PGUID
0
0
0
0
0
f
f
r
n
16
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1251
(
pg_demon
76
PGUID
0
0
0
0
0
f
t
r
n
4
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1253
(
pg_magic
80
PGUID
0
0
0
0
0
f
t
r
n
2
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1255
(
pg_proc
81
PGUID
0
0
0
0
0
f
f
r
n
16
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1257
(
pg_server
82
PGUID
0
0
0
0
0
f
t
r
n
3
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1259
(
pg_class
83
PGUID
0
0
0
0
0
f
f
r
n
18
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1260
(
pg_user
86
PGUID
0
0
0
0
0
f
t
r
n
6
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1261
(
pg_group
87
PGUID
0
0
0
0
0
f
t
s
n
3
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1262
(
pg_database
88
PGUID
0
0
0
0
0
f
t
r
n
3
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1263
(
pg_defaults
89
PGUID
0
0
0
0
0
f
t
r
n
2
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1264
(
pg_variable
90
PGUID
0
0
0
0
0
f
t
s
n
2
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1269
(
pg_log
99
PGUID
0
0
0
0
0
f
t
s
n
1
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1271
(
pg_time
100
PGUID
0
0
0
0
0
f
t
s
n
1
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1273
(
pg_hosts
101
PGUID
0
0
0
0
0
f
t
s
n
3
0
-
-
f
_null_
));
DATA
(
insert
OID
=
1247
(
pg_type
71
PGUID
0
0
0
0
0
f
f
r
n
16
0
0
f
_null_
));
DATA
(
insert
OID
=
1249
(
pg_attribute
75
PGUID
0
0
0
0
0
f
f
r
n
16
0
0
f
_null_
));
DATA
(
insert
OID
=
1251
(
pg_demon
76
PGUID
0
0
0
0
0
f
t
r
n
4
0
0
f
_null_
));
DATA
(
insert
OID
=
1253
(
pg_magic
80
PGUID
0
0
0
0
0
f
t
r
n
2
0
0
f
_null_
));
DATA
(
insert
OID
=
1255
(
pg_proc
81
PGUID
0
0
0
0
0
f
f
r
n
16
0
0
f
_null_
));
DATA
(
insert
OID
=
1257
(
pg_server
82
PGUID
0
0
0
0
0
f
t
r
n
3
0
0
f
_null_
));
DATA
(
insert
OID
=
1259
(
pg_class
83
PGUID
0
0
0
0
0
f
f
r
n
18
0
0
f
_null_
));
DATA
(
insert
OID
=
1260
(
pg_user
86
PGUID
0
0
0
0
0
f
t
r
n
6
0
0
f
_null_
));
DATA
(
insert
OID
=
1261
(
pg_group
87
PGUID
0
0
0
0
0
f
t
s
n
3
0
0
f
_null_
));
DATA
(
insert
OID
=
1262
(
pg_database
88
PGUID
0
0
0
0
0
f
t
r
n
3
0
0
f
_null_
));
DATA
(
insert
OID
=
1263
(
pg_defaults
89
PGUID
0
0
0
0
0
f
t
r
n
2
0
0
f
_null_
));
DATA
(
insert
OID
=
1264
(
pg_variable
90
PGUID
0
0
0
0
0
f
t
s
n
2
0
0
f
_null_
));
DATA
(
insert
OID
=
1269
(
pg_log
99
PGUID
0
0
0
0
0
f
t
s
n
1
0
0
f
_null_
));
DATA
(
insert
OID
=
1271
(
pg_time
100
PGUID
0
0
0
0
0
f
t
s
n
1
0
0
f
_null_
));
DATA
(
insert
OID
=
1273
(
pg_hosts
101
PGUID
0
0
0
0
0
f
t
s
n
3
0
0
f
_null_
));
DATA
(
insert
OID
=
1215
(
pg_attrdef
109
PGUID
0
0
0
0
0
t
t
s
n
4
0
0
f
_null_
));
DATA
(
insert
OID
=
1216
(
pg_relcheck
110
PGUID
0
0
0
0
0
t
t
s
n
4
0
0
f
_null_
));
#define RelOid_pg_type 1247
#define RelOid_pg_demon 1251
...
...
@@ -153,6 +153,8 @@ DATA(insert OID = 1273 ( pg_hosts 101 PGUID 0 0 0 0 0 f t s n 3 0 - -
#define RelOid_pg_log 1269
#define RelOid_pg_time 1271
#define RelOid_pg_hosts 1273
#define RelOid_pg_attrdef 1215
#define RelOid_pg_relcheck 1216
#define MAX_SYSTEM_RELOID 1273
/* this does not seem to be used */
/* anywhere */
...
...
src/include/catalog/pg_relcheck.h
0 → 100644
View file @
25aa0f8d
/*-------------------------------------------------------------------------
*
* pg_relcheck.h--
*
*
* Copyright (c) 1994, Regents of the University of California
*
* NOTES
* the genbki.sh script reads this file and generates .bki
* information from the DATA() statements.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_RELCHECK_H
#define PG_RELCHECK_H
/* ----------------
* postgres.h contains the system type definintions and the
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
* can be read by both genbki.sh and the C compiler.
* ----------------
*/
/* ----------------
* pg_relcheck definition. cpp turns this into
* typedef struct FormData_pg_relcheck
* ----------------
*/
CATALOG
(
pg_relcheck
)
BOOTSTRAP
{
Oid
rcrelid
;
NameData
rcname
;
text
rcbin
;
text
rcsrc
;
}
FormData_pg_relcheck
;
/* ----------------
* Form_pg_relcheck corresponds to a pointer to a tuple with
* the format of pg_relcheck relation.
* ----------------
*/
typedef
FormData_pg_relcheck
*
Form_pg_relcheck
;
/* ----------------
* compiler constants for pg_relcheck
* ----------------
*/
#define Natts_pg_relcheck 4
#define Anum_pg_relcheck_rcrelid 1
#define Anum_pg_relcheck_rcname 2
#define Anum_pg_relcheck_rcbin 3
#define Anum_pg_relcheck_rcsrc 4
#endif
/* PG_RELCHECK_H */
src/include/catalog/pg_type.h
View file @
25aa0f8d
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.1
3 1997/08/19 21:37:54 momjian
Exp $
* $Id: pg_type.h,v 1.1
4 1997/08/21 01:37:55 vadim
Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -198,8 +198,10 @@ DATA(insert OID = 99 ( pg_log PGUID 1 1 t b t \054 1269 0 foo bar foo bar
/* OIDS 100 - 199 */
DATA
(
insert
OID
=
100
(
pg_time
PGUID
1
1
t
b
t
\
054
1271
0
foo
bar
foo
bar
c
_null_
));
DATA
(
insert
OID
=
101
(
pg_hosts
PGUID
1
1
t
b
t
\
054
1273
0
foo
bar
foo
bar
c
_null_
));
DATA
(
insert
OID
=
100
(
pg_time
PGUID
1
1
t
b
t
\
054
1271
0
foo
bar
foo
bar
c
_null_
));
DATA
(
insert
OID
=
101
(
pg_hosts
PGUID
1
1
t
b
t
\
054
1273
0
foo
bar
foo
bar
c
_null_
));
DATA
(
insert
OID
=
109
(
pg_attrdef
PGUID
1
1
t
b
t
\
054
1215
0
foo
bar
foo
bar
c
_null_
));
DATA
(
insert
OID
=
110
(
pg_relcheck
PGUID
1
1
t
b
t
\
054
1216
0
foo
bar
foo
bar
c
_null_
));
/* OIDS 200 - 299 */
...
...
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