Changes between Initial Version and Version 1 of NetDRMSInPostgres9


Ignore:
Timestamp:
08/06/14 11:59:04 (10 years ago)
Author:
jennifer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NetDRMSInPostgres9

    v1 v1  
     1Compiling NetDRMS v.7 against Postgres 9.2 on a slony receipient (e.g. a normal NetDRMS client) requires changing one line in the SUMS code, and ensuring config.local has the right paths (file located in the top netdrms source directory).  It may also require changes to local environment variables if you have an existing Postgres 8.4.x installed on the machine.   
     2 
     3If you already have a prior version of Postgres installed and want to compile NetDRMS against v. 9.x instead, set your $PATH and $LD_LIBRARY_PATH variables properly to reflect the Postgres 9.2 paths.  You might want to do this a .profile file and source it every time you log in to avoid confusing errata later.  Assign corresponding paths to Postgres-specific variables in config.local. 
     4 
     5The change required to the SUMS code is one line in two places.   
     6 
     7Change two files in base/sums/libs/pg    named SUMLIB_RmDo.pgc and SUMLIB_RmDoX.pgc  and make this modification to line 9 
     8{{{ 
     9// EXEC SQL TYPE uint64_t IS unsigned long long; 
     10EXEC SQL TYPE uint64_t IS unsigned long int; 
     11}}} 
     12 
     13There you go - that's all that is required. 
     14<hr> 
     15 
     16Here's a little program from Igor to test this integer change, and my output: 
     17 
     18{{{ 
     19#include <stdio.h> 
     20 
     21int main(int argc, char**argv) { 
     22  unsigned long int var1; 
     23  unsigned long long var2; 
     24 
     25  printf ("unsigned long long [%d] and unsigned long int [%d]\n",sizeof(var2), sizeof(var1)); 
     26 
     27 
     28  return 0; 
     29} 
     30 
     31}}} 
     32Save program as: long_int_size.c 
     33then do 
     34gcc -o long_int_size long_int_size.c 
     35and then execute 
     36./long_int_size 
     37 
     38My results are as follows: 
     39{{{ 
     40sdo3>  ./long_int_size 
     41sdo3>  unsigned long long [8] and unsigned long int [8] 
     42}}}