Changeset 1266

Show
Ignore:
Timestamp:
07/13/07 05:08:26 (3 years ago)
Author:
jtv
Message:

Documentation improvements, thanks Andrew Maclean

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r1265 r1266  
     12007-07-13  Jeroen T. Vermeulen <jtv@xs4all.nl> 
     2 README: 
     3  - Documented PGPASSWORD, thanks Andrew Maclean 
     4  - Documented how to set environment variables, thanks Andrew Maclean 
     5 win32/INSTALL.txt: 
     6  - Documented how to create Windows makefiles, thanks Andrew Maclean 
    172007-07-12  Jeroen T. Vermeulen <jtv@xs4all.nl> 
    28 src/tablewriter.cxx: 
  • trunk/README

    r1260 r1266  
    149149        PGPORT          (PostgreSQL port to connect to; default is 5432) 
    150150        PGUSER          (your PostgreSQL user ID; defaults to your login name) 
     151        PGPASSWORD      (your PostgreSQL password, if needed) 
    151152 
    152153Further environment variables that may be of use to you are documented in the 
    153154libpq documentation and in the manpage for Postgres' command-line client, psql. 
    154155 
     156Setting environment variables works differently depending on your shell, but 
     157try (preferably in this order): 
     158    export VARIABLE=value 
     159or 
     160    VARIABLE=value 
     161    export VARIABLE 
     162or 
     163    set VARIABLE=value 
     164 
     165Try printing the variable afterwards to make sure.  The command is normally 
     166    echo $VARIABLE 
     167and, if you set the variable successfully, should print the value you assigned. 
     168It will print nothing if you failed to set the variable. 
     169 
    155170Should you have trouble finding the socket for a database running locally on a 
    156 Unix socket, try locating the socket in the filesystem.  This should appear as a 
     171Unix socket, try locating the socket in the filesystem.  It should appear as a 
    157172"file" called .s.PGSQL.5432 (if you are new to Unix-like systems, be warned that 
    158173files whose name start with a dot are not displayed by default).  Set PGHOST to 
  • trunk/win32/INSTALL.txt

    r1252 r1266  
    6060Before you can build libpqxx you need to provide certain common settings. 
    6161 
    62  i) Copy win32/common-sample to win32/common, and edit the latter to reflect the 
    63    paths to your PostgreSQL includes and library files.  On Windows these may 
    64    differ from one person's system to another, but if you compiled PostgreSQL 
    65    for yourself to obtain libpq, simply set the PGSQLSRC in win32/common to 
    66    point to the "src" subdirectory in your PostgreSQL source tree.  You may also 
    67    have to edit the LIBPATH1 and LIBPATH2 variables to point to where your 
    68    actual libpq library is.  There are two of these because Visual C++ will 
    69    normally produce two versions ("release" and "debug") of the library, and the 
    70    build procedure may need to find either, depending on which kind of libpqxx 
    71    build you'll be doing.  If you have only one libpq version, just set LIBPATH1 
    72    and LIBPATH2 to name the same directory. 
    73  
    74 ii) If you cannot run the configure script: Create the configuration headers, 
    75    include/pqxx/config-*-*.h.  From config/sample-headers, copy the ones from 
    76    the directories most accurately describing your compiler and libpq version, 
    77    respectively.  On a Unix-like system these would be generated by the 
    78    configure script; in the Windows case they may need some editing.  How these 
    79    files work is described in more detail below. 
     62  i) Copy win32/common-sample to win32/common, and edit the latter to reflect 
     63    the paths to your PostgreSQL includes and library files.  On Windows these 
     64    may differ from one person's system to another, but if you compiled 
     65    PostgreSQL for yourself to obtain libpq, simply set the PGSQLSRC in 
     66    win32/common to point to the "src" subdirectory in your PostgreSQL source 
     67    tree.  You may also have to edit the LIBPATH1 and LIBPATH2 variables to 
     68    point to where your actual libpq library is.  There are two of these because 
     69    Visual C++ will normally produce two versions ("release" and "debug") of the 
     70    library, and the build procedure may need to find either, depending on which 
     71    kind of libpqxx build you'll be doing.  If you have only one libpq version, 
     72    just set LIBPATH1 and LIBPATH2 to name the same directory. 
     73 
     74 ii) If you cannot run the configure script: Create the configuration headers, 
     75    include/pqxx/config-*-*.h.  From config/sample-headers, copy the ones from 
     76    the directories most accurately describing your compiler and libpq version, 
     77    respectively.  On a Unix-like system these would be generated by the 
     78    configure script; in the Windows case they may need some editing.  How these 
     79    files work is described in more detail below. 
     80 
     81iii) If you are building from a development source tree rather than from a 
     82    release distribution, you may not have the makefiles for your compiler. 
     83    These makefiles should be in the win32 directory and have names ending in 
     84    ".mak".  If you have python, you can generate them using the template2mak.py 
     85    script in the tools directory: 
     86 
     87    ./tools/template2mak.py win32/mingw.mak.template win32/mingw.mak 
     88    ./tools/template2mak.py win32/vc-libpqxx.mak.template win32/vc-libpqxx.mak 
     89    ./tools/template2mak.py win32/vc-test.mak.template win32/vc-test.mak 
    8090 
    8191 
     
    941041) Run "make -f win32/MinGW.mak" 
    951052) Consider installing a Unix-like environment like MSYS to automate all this! 
    96     
     106 
    97107After that, it is recommended that you compile and run the self-test programs 
    98108included in the package.  Unix, Cygwin, or MSYS users simply type "make check"