Hi,

I've attached the changes I've made to pg_attribute.h - I can't see what's
wrong but whenever I do an initdb it fails:

initdb -D /home/chriskl/local/data
The files belonging to this database system will be owned by user "chriskl".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /home/chriskl/local/data... ok
creating directory /home/chriskl/local/data/base... ok
creating directory /home/chriskl/local/data/global... ok
creating directory /home/chriskl/local/data/pg_xlog... ok
creating directory /home/chriskl/local/data/pg_clog... ok
creating template1 database in /home/chriskl/local/data/base/1...
initdb failed.
Removing /home/chriskl/local/data.

Chris
Index: pg_attribute.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_attribute.h,v
retrieving revision 1.93
diff -c -r1.93 pg_attribute.h
*** pg_attribute.h      2002/06/20 20:29:44     1.93
--- pg_attribute.h      2002/07/04 02:08:29
***************
*** 142,147 ****
--- 142,150 ----
  
        /* Has DEFAULT value or not */
        bool            atthasdef;
+ 
+       /* Is dropped or not */
+       bool            attisdropped;
  } FormData_pg_attribute;
  
  /*
***************
*** 150,156 ****
   * because of alignment padding at the end of the struct.)
   */
  #define ATTRIBUTE_TUPLE_SIZE \
!       (offsetof(FormData_pg_attribute,atthasdef) + sizeof(bool))
  
  /* ----------------
   *            Form_pg_attribute corresponds to a pointer to a tuple with
--- 153,159 ----
   * because of alignment padding at the end of the struct.)
   */
  #define ATTRIBUTE_TUPLE_SIZE \
!       (offsetof(FormData_pg_attribute,attisdropped) + sizeof(bool))
  
  /* ----------------
   *            Form_pg_attribute corresponds to a pointer to a tuple with
***************
*** 164,170 ****
   * ----------------
   */
  
! #define Natts_pg_attribute                            15
  #define Anum_pg_attribute_attrelid            1
  #define Anum_pg_attribute_attname             2
  #define Anum_pg_attribute_atttypid            3
--- 167,173 ----
   * ----------------
   */
  
! #define Natts_pg_attribute                            16
  #define Anum_pg_attribute_attrelid            1
  #define Anum_pg_attribute_attname             2
  #define Anum_pg_attribute_atttypid            3
***************
*** 180,185 ****
--- 183,189 ----
  #define Anum_pg_attribute_attalign            13
  #define Anum_pg_attribute_attnotnull  14
  #define Anum_pg_attribute_atthasdef           15
+ #define Anum_pg_attribute_attisdropped                16
  
  
  
***************
*** 398,405 ****
  { 1249, {"attstorage"},   18, 0,      1, 11, 0, -1, -1, true, 'p', false, 'c', 
false, false }, \
  { 1249, {"attisset"},   16, 0,        1, 12, 0, -1, -1, true, 'p', false, 'c', 
false, false }, \
  { 1249, {"attalign"},   18, 0,        1, 13, 0, -1, -1, true, 'p', false, 'c', 
false, false }, \
! { 1249, {"attnotnull"},  16, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', false, 
false }, \
! { 1249, {"atthasdef"},         16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', 
false, false }
  
  DATA(insert ( 1249 attrelid                   26 DEFAULT_ATTSTATTARGET  4   1 0 -1 
-1 t p f i f f));
  DATA(insert ( 1249 attname                    19 DEFAULT_ATTSTATTARGET NAMEDATALEN  
2 0 -1 -1 f p f i f f));
--- 402,410 ----
  { 1249, {"attstorage"},   18, 0,      1, 11, 0, -1, -1, true, 'p', false, 'c', 
false, false }, \
  { 1249, {"attisset"},   16, 0,        1, 12, 0, -1, -1, true, 'p', false, 'c', 
false, false }, \
  { 1249, {"attalign"},   18, 0,        1, 13, 0, -1, -1, true, 'p', false, 'c', 
false, false }, \
! { 1249, {"attnotnull"},       16, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', false, 
false }, \
! { 1249, {"atthasdef"},                16, 0, 1, 15, 0, -1, -1, true, 'p', false, 
'c', false, false }, \
! { 1249, {"attisdropped"},     16, 0, 1, 16, 0, -1, -1, true, 'p', false, 'c', false, 
false }
  
  DATA(insert ( 1249 attrelid                   26 DEFAULT_ATTSTATTARGET  4   1 0 -1 
-1 t p f i f f));
  DATA(insert ( 1249 attname                    19 DEFAULT_ATTSTATTARGET NAMEDATALEN  
2 0 -1 -1 f p f i f f));
***************
*** 416,421 ****
--- 421,427 ----
  DATA(insert ( 1249 attalign                   18 0  1  13 0 -1 -1 t p f c f f));
  DATA(insert ( 1249 attnotnull         16 0  1  14 0 -1 -1 t p f c f f));
  DATA(insert ( 1249 atthasdef          16 0  1  15 0 -1 -1 t p f c f f));
+ DATA(insert ( 1249 attisdropped               16 0  1  16 0 -1 -1 t p f c f f));
  DATA(insert ( 1249 ctid                               27 0  6  -1 0 -1 -1 f p f i f 
f));
  /* no OIDs in pg_attribute */
  DATA(insert ( 1249 xmin                               28 0  4  -3 0 -1 -1 t p f i f 
f));

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to