Index: src/include/catalog/pg_attribute.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/catalog/pg_attribute.h,v
retrieving revision 1.99
diff -c -r1.99 pg_attribute.h
*** src/include/catalog/pg_attribute.h 2002/09/04 20:31:37 1.99
--- src/include/catalog/pg_attribute.h 2002/09/13 01:46:07
***************
*** 147,154 ****
/* Is dropped (ie, logically invisible) or not */
bool attisdropped;
! /* Is inherited from a parent relation */
! bool attisinherited;
} FormData_pg_attribute;
/*
--- 147,154 ----
/* Is dropped (ie, logically invisible) or not */
bool attisdropped;
! /* Number of parents this attribute has */
! int2 attisinherited;
} FormData_pg_attribute;
/*
***************
*** 157,163 ****
* because of alignment padding at the end of the struct.)
*/
#define ATTRIBUTE_TUPLE_SIZE \
! (offsetof(FormData_pg_attribute,attisinherited) + sizeof(bool))
/* ----------------
* Form_pg_attribute corresponds to a pointer to a tuple with
--- 157,163 ----
* because of alignment padding at the end of the struct.)
*/
#define ATTRIBUTE_TUPLE_SIZE \
! (offsetof(FormData_pg_attribute,attisinherited) + sizeof(int2))
/* ----------------
* Form_pg_attribute corresponds to a pointer to a tuple with
***************
*** 219,486 ****
* ----------------
*/
#define Schema_pg_type \
! { 1247, {"typname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typowner"}, 23, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typlen"}, 21, 0, 2, 4, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1247, {"typbyval"}, 16, 0, 1, 5, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typtype"}, 18, -1, 1, 6, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typisdefined"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typdelim"}, 18, 0, 1, 8, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typrelid"}, 26, 0, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typelem"}, 26, 0, 4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typinput"}, 24, 0, 4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typoutput"}, 24, 0, 4, 12, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typalign"}, 18, 0, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typstorage"}, 18, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typnotnull"}, 16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typbasetype"}, 26, 0, 4, 16, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typtypmod"}, 23, 0, 4, 17, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typndims"}, 23, 0, 4, 18, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typdefaultbin"}, 25, 0, -1, 19, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }, \
! { 1247, {"typdefault"}, 25, 0, -1, 20, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }
!
!
! DATA(insert ( 1247 typname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1247 typnamespace 26 -1 4 2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typowner 23 0 4 3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typlen 21 0 2 4 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1247 typbyval 16 0 1 5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typtype 18 -1 1 6 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typisdefined 16 -1 1 7 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typdelim 18 0 1 8 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typrelid 26 0 4 9 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typelem 26 0 4 10 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typinput 24 0 4 11 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typoutput 24 0 4 12 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typalign 18 0 1 13 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typstorage 18 0 1 14 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typnotnull 16 0 1 15 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typbasetype 26 0 4 16 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typtypmod 23 0 4 17 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typndims 23 0 4 18 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typdefaultbin 25 0 -1 19 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1247 typdefault 25 0 -1 20 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1247 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1247 oid 26 0 4 -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_database
* ----------------
*/
! DATA(insert ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1262 datdba 23 0 4 2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 encoding 23 0 4 3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 datistemplate 16 0 1 4 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1262 datallowconn 16 0 1 5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1262 datlastsysoid 26 0 4 6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 datvacuumxid 28 0 4 7 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 datfrozenxid 28 0 4 8 0 -1 -1 t p f i t f f f));
/* do not mark datpath as toastable; GetRawDatabaseInfo won't cope */
! DATA(insert ( 1262 datpath 25 0 -1 9 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1262 datconfig 1009 0 -1 10 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1262 datacl 1034 0 -1 11 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1262 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1262 oid 26 0 4 -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_proc
* ----------------
*/
#define Schema_pg_proc \
! { 1255, {"proname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"pronamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"proowner"}, 23, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"prolang"}, 26, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"proisagg"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"prosecdef"}, 16, 0, 1, 6, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"proisstrict"}, 16, 0, 1, 7, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"proretset"}, 16, 0, 1, 8, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"provolatile"}, 18, 0, 1, 9, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"pronargs"}, 21, 0, 2, 10, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1255, {"prorettype"}, 26, 0, 4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"proargtypes"}, 30, 0, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"prosrc"}, 25, 0, -1, 13, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }, \
! { 1255, {"probin"}, 17, 0, -1, 14, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }, \
! { 1255, {"proacl"}, 1034, 0, -1, 15, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }
!
! DATA(insert ( 1255 proname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1255 pronamespace 26 -1 4 2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 proowner 23 0 4 3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 prolang 26 0 4 4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 proisagg 16 -1 1 5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 prosecdef 16 0 1 6 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 proisstrict 16 0 1 7 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 proretset 16 0 1 8 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 provolatile 18 0 1 9 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 pronargs 21 0 2 10 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1255 prorettype 26 0 4 11 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 proargtypes 30 0 INDEX_MAX_KEYS*4 12 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1255 prosrc 25 0 -1 13 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1255 probin 17 0 -1 14 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1255 proacl 1034 0 -1 15 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1255 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1255 oid 26 0 4 -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_shadow
* ----------------
*/
! DATA(insert ( 1260 usename 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1260 usesysid 23 -1 4 2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 usecreatedb 16 0 1 3 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1260 usesuper 16 0 1 4 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1260 usecatupd 16 0 1 5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1260 passwd 25 0 -1 6 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1260 valuntil 702 0 4 7 0 -1 -1 t p f i f f f f));
! DATA(insert ( 1260 useconfig 1009 0 -1 8 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1260 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
/* no OIDs in pg_shadow */
! DATA(insert ( 1260 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_group
* ----------------
*/
! DATA(insert ( 1261 groname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1261 grosysid 23 -1 4 2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 grolist 1007 0 -1 3 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1261 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
/* no OIDs in pg_group */
! DATA(insert ( 1261 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_attribute
* ----------------
*/
#define Schema_pg_attribute \
! { 1249, {"attrelid"}, 26, -1, 4, 1, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attname"}, 19, -1, NAMEDATALEN, 2, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"atttypid"}, 26, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attstattarget"}, 23, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attlen"}, 21, 0, 2, 5, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1249, {"attnum"}, 21, 0, 2, 6, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1249, {"attndims"}, 23, 0, 4, 7, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attcacheoff"}, 23, 0, 4, 8, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"atttypmod"}, 23, 0, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attbyval"}, 16, 0, 1, 10, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attstorage"}, 18, 0, 1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attisset"}, 16, 0, 1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attalign"}, 18, 0, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attnotnull"}, 16, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"atthasdef"}, 16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attisdropped"}, 16, 0, 1, 16, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attisinherited"},16,0, 1, 17, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }
!
! DATA(insert ( 1249 attrelid 26 -1 4 1 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attname 19 -1 NAMEDATALEN 2 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1249 atttypid 26 0 4 3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attstattarget 23 0 4 4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attlen 21 0 2 5 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1249 attnum 21 0 2 6 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1249 attndims 23 0 4 7 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attcacheoff 23 0 4 8 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 atttypmod 23 0 4 9 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attbyval 16 0 1 10 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attstorage 18 0 1 11 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attisset 16 0 1 12 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attalign 18 0 1 13 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attnotnull 16 0 1 14 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 atthasdef 16 0 1 15 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attisdropped 16 0 1 16 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attisinherited 16 0 1 17 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
/* no OIDs in pg_attribute */
! DATA(insert ( 1249 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_class
* ----------------
*/
#define Schema_pg_class \
! { 1259, {"relname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltype"}, 26, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relowner"}, 23, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relam"}, 26, 0, 4, 5, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relfilenode"}, 26, 0, 4, 6, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relpages"}, 23, 0, 4, 7, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltuples"}, 700, 0, 4, 8, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltoastrelid"}, 26, 0, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltoastidxid"}, 26, 0, 4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relhasindex"}, 16, 0, 1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relisshared"}, 16, 0, 1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relkind"}, 18, -1, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relnatts"}, 21, 0, 2, 14, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relchecks"}, 21, 0, 2, 15, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"reltriggers"}, 21, 0, 2, 16, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relukeys"}, 21, 0, 2, 17, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relfkeys"}, 21, 0, 2, 18, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relrefs"}, 21, 0, 2, 19, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relhasoids"}, 16, 0, 1, 20, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relhaspkey"}, 16, 0, 1, 21, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relhasrules"}, 16, 0, 1, 22, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relhassubclass"},16, 0, 1, 23, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relacl"}, 1034, 0, -1, 24, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }
!
! DATA(insert ( 1259 relname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1259 relnamespace 26 -1 4 2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 reltype 26 0 4 3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relowner 23 0 4 4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relam 26 0 4 5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relfilenode 26 0 4 6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relpages 23 0 4 7 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 reltuples 700 0 4 8 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1259 reltoastrelid 26 0 4 9 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 reltoastidxid 26 0 4 10 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relhasindex 16 0 1 11 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relisshared 16 0 1 12 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relkind 18 -1 1 13 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relnatts 21 0 2 14 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relchecks 21 0 2 15 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 reltriggers 21 0 2 16 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relukeys 21 0 2 17 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relfkeys 21 0 2 18 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relrefs 21 0 2 19 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relhasoids 16 0 1 20 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relhaspkey 16 0 1 21 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relhasrules 16 0 1 22 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relhassubclass 16 0 1 23 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relacl 1034 0 -1 24 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1259 ctid 27 0 6 -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1259 oid 26 0 4 -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 xmin 28 0 4 -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 cmin 29 0 4 -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 xmax 28 0 4 -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 cmax 29 0 4 -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f f));
/* ----------------
* pg_xactlock - this is not a real relation, but is a placeholder
--- 219,486 ----
* ----------------
*/
#define Schema_pg_type \
! { 1247, {"typname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typowner"}, 23, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typlen"}, 21, 0, 2, 4, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1247, {"typbyval"}, 16, 0, 1, 5, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typtype"}, 18, -1, 1, 6, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typisdefined"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typdelim"}, 18, 0, 1, 8, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typrelid"}, 26, 0, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typelem"}, 26, 0, 4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typinput"}, 24, 0, 4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typoutput"}, 24, 0, 4, 12, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typalign"}, 18, 0, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typstorage"}, 18, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typnotnull"}, 16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1247, {"typbasetype"}, 26, 0, 4, 16, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typtypmod"}, 23, 0, 4, 17, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typndims"}, 23, 0, 4, 18, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1247, {"typdefaultbin"}, 25, 0, -1, 19, 0, -1, -1, false, 'x', false, 'i', false, false, false, 0 }, \
! { 1247, {"typdefault"}, 25, 0, -1, 20, 0, -1, -1, false, 'x', false, 'i', false, false, false, 0 }
!
!
! DATA(insert ( 1247 typname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1247 typnamespace 26 -1 4 2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typowner 23 0 4 3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typlen 21 0 2 4 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1247 typbyval 16 0 1 5 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typtype 18 -1 1 6 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typisdefined 16 -1 1 7 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typdelim 18 0 1 8 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typrelid 26 0 4 9 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typelem 26 0 4 10 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typinput 24 0 4 11 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typoutput 24 0 4 12 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typalign 18 0 1 13 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typstorage 18 0 1 14 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typnotnull 16 0 1 15 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1247 typbasetype 26 0 4 16 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typtypmod 23 0 4 17 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typndims 23 0 4 18 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 typdefaultbin 25 0 -1 19 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1247 typdefault 25 0 -1 20 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1247 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1247 oid 26 0 4 -2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1247 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_database
* ----------------
*/
! DATA(insert ( 1262 datname 19 0 NAMEDATALEN 1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1262 datdba 23 0 4 2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 encoding 23 0 4 3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 datistemplate 16 0 1 4 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1262 datallowconn 16 0 1 5 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1262 datlastsysoid 26 0 4 6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 datvacuumxid 28 0 4 7 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 datfrozenxid 28 0 4 8 0 -1 -1 t p f i t f f 0));
/* do not mark datpath as toastable; GetRawDatabaseInfo won't cope */
! DATA(insert ( 1262 datpath 25 0 -1 9 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1262 datconfig 1009 0 -1 10 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1262 datacl 1034 0 -1 11 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1262 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1262 oid 26 0 4 -2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1262 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_proc
* ----------------
*/
#define Schema_pg_proc \
! { 1255, {"proname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, 0 }, \
! { 1255, {"pronamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1255, {"proowner"}, 23, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1255, {"prolang"}, 26, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1255, {"proisagg"}, 16, -1, 1, 5, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1255, {"prosecdef"}, 16, 0, 1, 6, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1255, {"proisstrict"}, 16, 0, 1, 7, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1255, {"proretset"}, 16, 0, 1, 8, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1255, {"provolatile"}, 18, 0, 1, 9, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1255, {"pronargs"}, 21, 0, 2, 10, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1255, {"prorettype"}, 26, 0, 4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1255, {"proargtypes"}, 30, 0, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', false, 'i', true, false, false, 0 }, \
! { 1255, {"prosrc"}, 25, 0, -1, 13, 0, -1, -1, false, 'x', false, 'i', false, false, false, 0 }, \
! { 1255, {"probin"}, 17, 0, -1, 14, 0, -1, -1, false, 'x', false, 'i', false, false, false, 0 }, \
! { 1255, {"proacl"}, 1034, 0, -1, 15, 0, -1, -1, false, 'x', false, 'i', false, false, false, 0 }
!
! DATA(insert ( 1255 proname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1255 pronamespace 26 -1 4 2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 proowner 23 0 4 3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 prolang 26 0 4 4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 proisagg 16 -1 1 5 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1255 prosecdef 16 0 1 6 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1255 proisstrict 16 0 1 7 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1255 proretset 16 0 1 8 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1255 provolatile 18 0 1 9 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1255 pronargs 21 0 2 10 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1255 prorettype 26 0 4 11 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 proargtypes 30 0 INDEX_MAX_KEYS*4 12 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1255 prosrc 25 0 -1 13 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1255 probin 17 0 -1 14 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1255 proacl 1034 0 -1 15 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1255 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1255 oid 26 0 4 -2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1255 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_shadow
* ----------------
*/
! DATA(insert ( 1260 usename 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1260 usesysid 23 -1 4 2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1260 usecreatedb 16 0 1 3 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1260 usesuper 16 0 1 4 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1260 usecatupd 16 0 1 5 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1260 passwd 25 0 -1 6 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1260 valuntil 702 0 4 7 0 -1 -1 t p f i f f f 0));
! DATA(insert ( 1260 useconfig 1009 0 -1 8 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1260 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
/* no OIDs in pg_shadow */
! DATA(insert ( 1260 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1260 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1260 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1260 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1260 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_group
* ----------------
*/
! DATA(insert ( 1261 groname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1261 grosysid 23 -1 4 2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1261 grolist 1007 0 -1 3 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1261 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
/* no OIDs in pg_group */
! DATA(insert ( 1261 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1261 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1261 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1261 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1261 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_attribute
* ----------------
*/
#define Schema_pg_attribute \
! { 1249, {"attrelid"}, 26, -1, 4, 1, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"attname"}, 19, -1, NAMEDATALEN, 2, 0, -1, -1, false, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"atttypid"}, 26, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"attstattarget"}, 23, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"attlen"}, 21, 0, 2, 5, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1249, {"attnum"}, 21, 0, 2, 6, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1249, {"attndims"}, 23, 0, 4, 7, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"attcacheoff"}, 23, 0, 4, 8, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"atttypmod"}, 23, 0, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1249, {"attbyval"}, 16, 0, 1, 10, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"attstorage"}, 18, 0, 1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"attisset"}, 16, 0, 1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"attalign"}, 18, 0, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"attnotnull"}, 16, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"atthasdef"}, 16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"attisdropped"}, 16, 0, 1, 16, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1249, {"attisinherited"},21,0, 2, 17, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }
!
! DATA(insert ( 1249 attrelid 26 -1 4 1 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 attname 19 -1 NAMEDATALEN 2 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1249 atttypid 26 0 4 3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 attstattarget 23 0 4 4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 attlen 21 0 2 5 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1249 attnum 21 0 2 6 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1249 attndims 23 0 4 7 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 attcacheoff 23 0 4 8 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 atttypmod 23 0 4 9 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 attbyval 16 0 1 10 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 attstorage 18 0 1 11 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 attisset 16 0 1 12 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 attalign 18 0 1 13 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 attnotnull 16 0 1 14 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 atthasdef 16 0 1 15 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 attisdropped 16 0 1 16 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1249 attisinherited 21 0 2 17 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1249 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
/* no OIDs in pg_attribute */
! DATA(insert ( 1249 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1249 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_class
* ----------------
*/
#define Schema_pg_class \
! { 1259, {"relname"}, 19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"relnamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"reltype"}, 26, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"relowner"}, 23, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"relam"}, 26, 0, 4, 5, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"relfilenode"}, 26, 0, 4, 6, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"relpages"}, 23, 0, 4, 7, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"reltuples"}, 700, 0, 4, 8, 0, -1, -1, false, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"reltoastrelid"}, 26, 0, 4, 9, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"reltoastidxid"}, 26, 0, 4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, 0 }, \
! { 1259, {"relhasindex"}, 16, 0, 1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relisshared"}, 16, 0, 1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relkind"}, 18, -1, 1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relnatts"}, 21, 0, 2, 14, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1259, {"relchecks"}, 21, 0, 2, 15, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1259, {"reltriggers"}, 21, 0, 2, 16, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1259, {"relukeys"}, 21, 0, 2, 17, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1259, {"relfkeys"}, 21, 0, 2, 18, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1259, {"relrefs"}, 21, 0, 2, 19, 0, -1, -1, true, 'p', false, 's', true, false, false, 0 }, \
! { 1259, {"relhasoids"}, 16, 0, 1, 20, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relhaspkey"}, 16, 0, 1, 21, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relhasrules"}, 16, 0, 1, 22, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relhassubclass"},16, 0, 1, 23, 0, -1, -1, true, 'p', false, 'c', true, false, false, 0 }, \
! { 1259, {"relacl"}, 1034, 0, -1, 24, 0, -1, -1, false, 'x', false, 'i', false, false, false, 0 }
!
! DATA(insert ( 1259 relname 19 -1 NAMEDATALEN 1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1259 relnamespace 26 -1 4 2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 reltype 26 0 4 3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 relowner 23 0 4 4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 relam 26 0 4 5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 relfilenode 26 0 4 6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 relpages 23 0 4 7 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 reltuples 700 0 4 8 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1259 reltoastrelid 26 0 4 9 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 reltoastidxid 26 0 4 10 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 relhasindex 16 0 1 11 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relisshared 16 0 1 12 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relkind 18 -1 1 13 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relnatts 21 0 2 14 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1259 relchecks 21 0 2 15 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1259 reltriggers 21 0 2 16 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1259 relukeys 21 0 2 17 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1259 relfkeys 21 0 2 18 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1259 relrefs 21 0 2 19 0 -1 -1 t p f s t f f 0));
! DATA(insert ( 1259 relhasoids 16 0 1 20 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relhaspkey 16 0 1 21 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relhasrules 16 0 1 22 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relhassubclass 16 0 1 23 0 -1 -1 t p f c t f f 0));
! DATA(insert ( 1259 relacl 1034 0 -1 24 0 -1 -1 f x f i f f f 0));
! DATA(insert ( 1259 ctid 27 0 6 -1 0 -1 -1 f p f i t f f 0));
! DATA(insert ( 1259 oid 26 0 4 -2 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 xmin 28 0 4 -3 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 cmin 29 0 4 -4 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 xmax 28 0 4 -5 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 cmax 29 0 4 -6 0 -1 -1 t p f i t f f 0));
! DATA(insert ( 1259 tableoid 26 0 4 -7 0 -1 -1 t p f i t f f 0));
/* ----------------
* pg_xactlock - this is not a real relation, but is a placeholder
***************
*** 490,495 ****
* table; and this entry is just to link to that one.
* ----------------
*/
! DATA(insert ( 376 xactlockfoo 26 0 4 1 0 -1 -1 t p f i t f f f));
#endif /* PG_ATTRIBUTE_H */
--- 490,495 ----
* table; and this entry is just to link to that one.
* ----------------
*/
! DATA(insert ( 376 xactlockfoo 26 0 4 1 0 -1 -1 t p f i t f f 0));
#endif /* PG_ATTRIBUTE_H */
Index: src/backend/commands/tablecmds.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/commands/tablecmds.c,v
retrieving revision 1.40
diff -c -r1.40 tablecmds.c
*** src/backend/commands/tablecmds.c 2002/09/06 00:01:53 1.40
--- src/backend/commands/tablecmds.c 2002/09/13 01:46:14
***************
*** 603,608 ****
--- 603,609 ----
def->is_not_null |= attribute->attnotnull;
/* Default and other constraints are handled below */
newattno[parent_attno - 1] = exist_attno;
+ def->is_inherited++;
}
else
{
***************
*** 615,621 ****
typename->typeid = attribute->atttypid;
typename->typmod = attribute->atttypmod;
def->typename = typename;
! def->is_inherited = true;
def->is_not_null = attribute->attnotnull;
def->raw_default = NULL;
def->cooked_default = NULL;
--- 616,622 ----
typename->typeid = attribute->atttypid;
typename->typmod = attribute->atttypmod;
def->typename = typename;
! def->is_inherited = 1;
def->is_not_null = attribute->attnotnull;
def->raw_default = NULL;
def->cooked_default = NULL;
***************
*** 750,755 ****
--- 751,757 ----
TypeNameToString(newdef->typename));
/* Merge of NOT NULL constraints = OR 'em together */
def->is_not_null |= newdef->is_not_null;
+ def->is_inherited++;
/* If new def has a default, override previous default */
if (newdef->raw_default != NULL)
{
***************
*** 1145,1151 ****
* if the attribute is inherited, forbid the renaming, unless we are
* already inside a recursive rename.
*/
! if (attform->attisinherited && !recursing)
elog(ERROR, "renameatt: inherited attribute \"%s\" may not be renamed",
oldattname);
--- 1147,1153 ----
* if the attribute is inherited, forbid the renaming, unless we are
* already inside a recursive rename.
*/
! if (attform->attisinherited>=1 && !recursing)
elog(ERROR, "renameatt: inherited attribute \"%s\" may not be renamed",
oldattname);
***************
*** 2363,2375 ****
RelationGetRelationName(rel));
/* Don't drop inherited columns */
! if (tupleDesc->attrs[attnum - 1]->attisinherited && !recursing)
elog(ERROR, "ALTER TABLE: Cannot drop inherited column \"%s\"",
colName);
/*
* If we are asked to drop ONLY in this table (no recursion), we need
! * to mark the inheritors' attribute as non-inherited.
*/
if (!recurse && !recursing)
{
--- 2365,2377 ----
RelationGetRelationName(rel));
/* Don't drop inherited columns */
! if (tupleDesc->attrs[attnum - 1]->attisinherited >= 1 && !recursing)
elog(ERROR, "ALTER TABLE: Cannot drop inherited column \"%s\"",
colName);
/*
* If we are asked to drop ONLY in this table (no recursion), we need
! * to substract one from all inheritors' attisinherited.
*/
if (!recurse && !recursing)
{
***************
*** 2394,2400 ****
elog(ERROR, "ALTER TABLE: relation %u has no column \"%s\"",
childrelid, colName);
! ((Form_pg_attribute) GETSTRUCT(tuple))->attisinherited = false;
simple_heap_update(attr_rel, &tuple->t_self, tuple);
--- 2396,2402 ----
elog(ERROR, "ALTER TABLE: relation %u has no column \"%s\"",
childrelid, colName);
! ((Form_pg_attribute) GETSTRUCT(tuple))->attisinherited--;
simple_heap_update(attr_rel, &tuple->t_self, tuple);
***************
*** 2402,2407 ****
--- 2404,2410 ----
CatalogUpdateIndexes(attr_rel, tuple);
heap_close(childrel, NoLock);
+ heap_freetuple(tuple);
}
heap_close(attr_rel, RowExclusiveLock);
}
***************
*** 2415,2434 ****
*children;
/* this routine is actually in the planner */
! children = find_all_inheritors(myrelid);
/*
! * find_all_inheritors does the recursive search of the
! * inheritance hierarchy, so all we have to do is process all of
! * the relids in the list that it returns.
*/
foreach(child, children)
{
Oid childrelid = lfirsti(child);
if (childrelid == myrelid)
continue;
! AlterTableDropColumn(childrelid, false, true, colName, behavior);
}
}
--- 2418,2465 ----
*children;
/* this routine is actually in the planner */
! children = find_inheritance_children(myrelid);
/*
! * find_inheritance_children only gets direct inheritors;
! * we'll have to check whether further recursion is needed
! * on a case by case basis.
*/
foreach(child, children)
{
Oid childrelid = lfirsti(child);
+ HeapTuple tuple;
+ Form_pg_attribute attrForm;
if (childrelid == myrelid)
continue;
!
! tuple = SearchSysCacheCopyAttName(childrelid, colName);
! if (!HeapTupleIsValid(tuple)) /* this shouldn't happen */
! elog(ERROR, "ALTER TABLE: relation %u does not have column %s",
! childrelid, colName);
! attrForm = (Form_pg_attribute) GETSTRUCT(tuple);
!
! /*
! * If attisinherited is greater than 1, decrease it.
! * If it's exactly 1, drop the column recursively.
! */
! if (attrForm->attisinherited > 1)
! {
! Relation attr_rel;
! attr_rel = heap_openr(AttributeRelationName, RowExclusiveLock);
!
! attrForm->attisinherited--;
! simple_heap_update(attr_rel, &tuple->t_self, tuple);
!
! /* keep the system catalog indexes current */
! CatalogUpdateIndexes(attr_rel, tuple);
! heap_close(attr_rel, RowExclusiveLock);
! }
! else if (attrForm->attisinherited == 1)
! AlterTableDropColumn(childrelid, true, true, colName, behavior);
!
! heap_freetuple(tuple);
}
}
Index: src/include/nodes/parsenodes.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/nodes/parsenodes.h,v
retrieving revision 1.206
diff -c -r1.206 parsenodes.h
*** src/include/nodes/parsenodes.h 2002/09/04 20:31:43 1.206
--- src/include/nodes/parsenodes.h 2002/09/13 01:52:14
***************
*** 301,307 ****
NodeTag type;
char *colname; /* name of column */
TypeName *typename; /* type of column */
! bool is_inherited; /* column is inherited? */
bool is_not_null; /* NOT NULL constraint specified? */
Node *raw_default; /* default value (untransformed parse
* tree) */
--- 301,307 ----
NodeTag type;
char *colname; /* name of column */
TypeName *typename; /* type of column */
! int2 is_inherited; /* number of parents of the column */
bool is_not_null; /* NOT NULL constraint specified? */
Node *raw_default; /* default value (untransformed parse
* tree) */
Index: doc/src/sgml/catalogs.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/catalogs.sgml,v
retrieving revision 2.59
diff -c -r2.59 catalogs.sgml
*** doc/src/sgml/catalogs.sgml 2002/09/03 01:04:40 2.59
--- doc/src/sgml/catalogs.sgml 2002/09/13 01:54:09
***************
*** 823,833 ****
attisinherited
! bool
! This column is inherited from some other relation. An inherited
! column cannot be dropped nor renamed.
--- 823,833 ----
attisinherited
! int2
! This column is inherited from the specified number of relations.
! An inherited column cannot be dropped nor renamed.