Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25aa0f8

Browse files
committed
New system relations to store DEFAULT/CHECK expressions.
1 parent197ced5 commit25aa0f8

File tree

6 files changed

+490
-345
lines changed

6 files changed

+490
-345
lines changed

‎src/include/catalog/indexing.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: indexing.h,v 1.2 1996/11/06 07:05:18 scrappy Exp $
10+
* $Id: indexing.h,v 1.3 1997/08/21 01:37:48 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -24,6 +24,8 @@
2424
#defineNum_pg_proc_indices3
2525
#defineNum_pg_type_indices2
2626
#defineNum_pg_class_indices2
27+
#defineNum_pg_attrdef_indices1
28+
#defineNum_pg_relcheck_indices1
2729

2830

2931
/*
@@ -39,11 +41,15 @@
3941
#defineTypeOidIndex "pg_typeidind"
4042
#defineClassNameIndex "pg_classnameind"
4143
#defineClassOidIndex "pg_classoidind"
44+
#defineAttrDefaultIndex "pg_attrdefind"
45+
#defineRelCheckIndex "pg_relcheckind"
4246

4347
externchar*Name_pg_attr_indices[];
4448
externchar*Name_pg_proc_indices[];
4549
externchar*Name_pg_type_indices[];
4650
externchar*Name_pg_class_indices[];
51+
externchar*Name_pg_attrdef_indices[];
52+
externchar*Name_pg_relcheck_indices[];
4753

4854
externchar*IndexedCatalogNames[];
4955

@@ -98,6 +104,9 @@ DECLARE_INDEX(pg_typenameind on pg_type using btree (typname name_ops));
98104
DECLARE_INDEX(pg_classnameindonpg_classusingbtree (relnamename_ops));
99105
DECLARE_INDEX(pg_classoidindonpg_classusingbtree (Oidoid_ops));
100106

107+
DECLARE_INDEX(pg_attrdefindonpg_attrdefusingbtree (adrelidoid_ops));
108+
DECLARE_INDEX(pg_relcheckindonpg_relcheckusingbtree (rcrelidoid_ops));
109+
101110
/* now build indices in the initialization scripts */
102111
BUILD_INDICES
103112

‎src/include/catalog/pg_attrdef.h

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* pg_attrdef.h--
4+
*
5+
*
6+
* Copyright (c) 1994, Regents of the University of California
7+
*
8+
* NOTES
9+
* the genbki.sh script reads this file and generates .bki
10+
* information from the DATA() statements.
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
#ifndefPG_ATTRDEF_H
15+
#definePG_ATTRDEF_H
16+
17+
/* ----------------
18+
*postgres.h contains the system type definintions and the
19+
*CATALOG(), BOOTSTRAP and DATA() sugar words so this file
20+
*can be read by both genbki.sh and the C compiler.
21+
* ----------------
22+
*/
23+
24+
/* ----------------
25+
*pg_attrdef definition. cpp turns this into
26+
*typedef struct FormData_pg_attrdef
27+
* ----------------
28+
*/
29+
CATALOG(pg_attrdef)BOOTSTRAP {
30+
Oidadrelid;
31+
int2adnum;
32+
textadbin;
33+
textadsrc;
34+
}FormData_pg_attrdef;
35+
36+
/* ----------------
37+
*Form_pg_attrdef corresponds to a pointer to a tuple with
38+
*the format of pg_attrdef relation.
39+
* ----------------
40+
*/
41+
typedefFormData_pg_attrdef*Form_pg_attrdef;
42+
43+
/* ----------------
44+
*compiler constants for pg_attrdef
45+
* ----------------
46+
*/
47+
#defineNatts_pg_attrdef4
48+
#defineAnum_pg_attrdef_adrelid1
49+
#defineAnum_pg_attrdef_adnum2
50+
#defineAnum_pg_attrdef_adbin3
51+
#defineAnum_pg_attrdef_adsrc4
52+
53+
54+
#endif/* PG_ATTRDEF_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp