From 2acdef186dda3ee4606f561446d2b825009fc2cf Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 18 Sep 2000 20:11:37 +0000 Subject: Move contrib/odbc/odbc.sql together with odbc driver, remove old files; revise ODBC "installation instructions"; update some other outdated documentation; update contrib documentation --- doc/src/sgml/ecpg.sgml | 15 +- doc/src/sgml/geqo.sgml | 4 +- doc/src/sgml/odbc.sgml | 629 +++++++++++-------------------------------------- doc/src/sgml/page.sgml | 48 ---- 4 files changed, 146 insertions(+), 550 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index fabf9bee397..8b3049c6ee7 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -1,5 +1,5 @@ @@ -31,9 +31,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.15 2000/08/23 05:59:01 thomas This describes an embedded SQL in C package for Postgres. - It is written by Linus Tolke and Michael Meskes. + The package is installed with the Postgres distribution. @@ -503,17 +503,6 @@ struct sqlca - - Installation - - - Since version 0.5 ecpg is distributed - together with Postgres. So you - should get your precompiler, libraries and header files compiled and - installed by default as a part of your installation. - - - For the Developer diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml index 04b8def4ed1..10fc2d90e8f 100644 --- a/doc/src/sgml/geqo.sgml +++ b/doc/src/sgml/geqo.sgml @@ -1,5 +1,5 @@ @@ -233,7 +233,7 @@ P''(t) generation of descendants at a time t Future Implementation Tasks for - <productname>ame>Post</productname>ame> <acronym>GEQO</acronym> + PostgreSQL GEQO Basic Improvements diff --git a/doc/src/sgml/odbc.sgml b/doc/src/sgml/odbc.sgml index a50f1f8bb59..b4d1826550a 100644 --- a/doc/src/sgml/odbc.sgml +++ b/doc/src/sgml/odbc.sgml @@ -1,5 +1,5 @@ @@ -70,496 +70,69 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.16 2000/08/29 20:02:07 same calls and the back end data source would look the same (to the Windows app). - - - <productname>Windows</productname> Applications + Installation - In the real world, differences in drivers and the level of - ODBC support - lessens the potential of ODBC: - - - - - Access, Delphi, and Visual Basic all support ODBC directly. - - - - - Under C++, such as Visual C++, - you can use the C++ ODBC API. - - - - - - In Visual C++, you can use the CRecordSet class, which wraps the - ODBC API - set within an MFC 4.2 class. This is the easiest route if you are doing - Windows C++ development under Windows NT. - - - + The first thing to note about the psqlODBC driver + (or any ODBC driver) is that there must exist a + driver manager on the system where the + ODBC driver is to be used. There exists a free + ODBC driver for Unix called iODBC + which can be obtained via http://www.iodbc.org. + Instructions for installing iODBC are contained in + the iODBC distribution. Having said that, any + driver manager that you can find for your platform should support + the psqlODBC driver, or any other ODBC + driver for that matter. - - Writing Applications - - - - If I write an application for Postgres - can I write it using ODBC calls - to the Postgres server, - or is that only when another database program - like MS SQL Server or Access needs to access the data? - - - - The ODBC API - is the way to go. - For Visual C++ coding you can find out more at - Microsoft's web site or in your VC++ docs. - - - - Visual Basic and the other RAD tools have Recordset objects - that use ODBC - directly to access data. Using the data-aware controls, you can quickly - link to the ODBC back end database - (very quickly). - - - - Playing around with MS Access will help you sort this out. Try using - File->Get External Data. - - - - - You'll have to set up a DSN first. - - - - - - + + To install psqlODBC you simply need to supply the + - - Unix Installation + + The installation-wide configuration file odbcinst.ini will be + installed into the directory /usr/local/pgsql/etc/, or equivalent, + depending on what - ApplixWare has an - ODBC database interface - supported on at least some platforms. - ApplixWare v4.4.2 has been - demonstrated under Linux with Postgres v7.0 - using the psqlODBC - driver contained in the Postgres distribution. + Additionally, you should install the ODBC catalog extensions. That will + provide a number of functions mandated by the ODBC standard that are not + supplied by PostgreSQL by default. The file + /usr/local/pgsql/share/odbc.sql (in the default installation layout) + contains the appropriate definitions, which you can install as follows: + +psql -d template1 -f LOCATION/odbc.sql + + where specifying template1 as the target + database will ensure that all subsequent new databases will + have these same definitions. - Building the Driver - - - The first thing - to note about the psqlODBC driver - (or any ODBC driver) is that there must - exist a driver manager on the system where - the ODBC driver is to be - used. There exists a freeware ODBC driver for Unix - called iodbc which - can be obtained from various locations on the Net, including at - AS200. - Instructions for installing iodbc - are beyond the scope of this - document, but there is a README - that can be found inside the iodbc compressed - .shar file that should explain how to get it up and running. - - - - Having said that, any driver manager that you can find for your platform - should support the psqlODBC driver - or any ODBC driver. - - - - The Unix configuration files for psqlODBC - have recently been extensively - reworked to allow for easy building on supported platforms as - well as to allow for support of other Unix platforms in the future. - The new configuration and build files for the driver should make it - a simple process to build the driver on the supported platforms. Currently - these include Linux and FreeBSD but we are hoping other users will - contribute the necessary information to quickly expand the number of - platforms for which the driver can be built. - - - - There are actually two separate methods to build the driver depending on - how you received it and these differences come down to only where and how to - run configure and make. - The driver can be built in a standalone, client-only installation, or can be - built as a part of the main Postgres distribution. - The standalone installation is convenient if you have ODBC - client applications on multiple, heterogeneous platforms. The integrated - installation is convenient when the target client is the same as the - server, or when the client and server have similar runtime configurations. - - - - Specifically if you have received the psqlODBC - driver as part of the Postgres distribution - (from now on referred to as an "integrated" build) then you will - configure and make the ODBC driver - from the top level source directory - of the Postgres distribution - along with the rest of its libraries. - If you received the driver as a standalone package than you will run - configure and make from the directory in which you unpacked the - driver source. - - - - Integrated Installation - - - This installation procedure is appropriate for an integrated installation. - - - - - Specify the - command-line argument for src/configure: - - -% ./configure --with-odbc -% make - - - - - - - Rebuild the Postgres distribution: - - -% make install - - - - - - - Install the ODBC catalog extensions available in - PGROOT/contrib/odbc/odbc.sql: - - -% psql -e template1 < $PGROOT/contrib/odbc/odbc.sql - - - where specifying template1 as the target - database will ensure that all subsequent new databases will - have these same definitions. - - - - + Supported Platforms - Once configured, the ODBC driver will be built and installed - into the areas defined for the other components of the - Postgres system. The installation-wide - ODBC configuration file will be placed into - the top directory of the Postgres target tree (POSTGRESDIR). - This can be overridden from the make command-line - as - -% make ODBCINST=filename install - + psqlODBC has been built and tested + on Linux. There have been reports of success + with FreeBSD and with Solaris. There are no known restrictions + on the basic code for other platforms which already support + Postgres. - - - Pre-v6.4 Integrated Installation - - - If you have a Postgres installation older than - v6.4, you have the original source tree available, - and you want to use the newest version of the ODBC - driver, then you may want to try this form of installation. - - - - - Copy the output tar file to your target system and unpack it into a - clean directory. - - - - - From the directory containing the - sources, type: - - -% ./configure -% make -% make POSTGRESDIR=PostgresTopDir install - - - - - - - If you would like to install components into different trees, - then you can specify various destinations explicitly: - - -% make BINDIR=bindir LIBDIR=libdir HEADERDIR=headerdir ODBCINST=instfile install - - - - - - - Standalone Installation - - - A standalone installation is not integrated with or built on the normal - Postgres distribution. It should be best suited - for building the ODBC driver for multiple, heterogeneous - clients who do not have a locally-installed Postgres - source tree. - - - - The default location for libraries and headers - for the standalone installation is /usr/local/lib - and /usr/local/include/iodbc, respectively. - There is another system wide configuration file that gets installed - as /share/odbcinst.ini (if /share - exists) or as /etc/odbcinst.ini - (if /share does not exist). - - - - - Installation of files into /share - or /etc requires system root privileges. - Most installation steps for Postgres do not - have this requirement, and you can choose another destination which - is writable by your non-root Postgres superuser - account instead. - - - - - - The standalone installation distribution can be built from the - Postgres distribution or may be obtained from - Insight Distributors, - the current maintainers of the non-Unix sources. - - - - Copy the zip - or gzipped tarfile to an empty directory. If using the zip package - unzip it with the command - -% unzip -a packagename - - - The option - is necessary to get rid of DOS - CR/LF pairs in the source files. - - - - If you have the gzipped tar package than simply run - - -% tar -xzf packagename - - - - - - - - To create a tar file for a complete standalone installation - from the main Postgres source tree: - - - - - - - Configure the main Postgres distribution. - - - - - Create the tar file: - - -% cd interfaces/odbc -% make standalone - - - - - - - Copy the output tar file to your target system. Be sure to transfer as - a binary file if using ftp. - - - - - - Unpack the tar file into a clean - directory. - - - - - - Configure the standalone installation: - - -% ./configure - - - - - The configuration can be done with options: - - -% ./configure --prefix=rootdir --with-odbc=inidir - - - where installs the libraries and headers in - the directories rootdir/lib and - rootdir/include/iodbc, and - installs odbcinst.ini in the - specified directory. - - - - Note that both of these options can also be used from the integrated build - but be aware that when used in the integrated build - will also apply to the rest of - your Postgres installation. - applies only to the configuration file - odbcinst.ini. - - - - - - Compile and link the source code: - - -% make ODBCINST=instdir - - - - - You can also override the default location for installation on the - 'make' command line. This only applies to the installation of the - library and header files. Since the driver needs to know the location - of the odbcinst.ini file attempting to override the enviroment variable - that specifies its installation directory will probably cause you - headaches. It is safest simply to allow the driver to install the - odbcinst.ini file in the default directory or the directory you specified - on the './configure' command line with --with-odbc. - - - - - - - - Install the source code: - - -% make POSTGRESDIR=targettree install - - - - - To override the library and header installation directories separately - you need to pass the correct installation variables on the - make install command line. These variables are - LIBDIR, HEADERDIR - and ODBCINST. - Overriding POSTGRESDIR on the make command line will cause - LIBDIR and HEADERDIR - to be rooted at the new directory you specify. - ODBCINST is independent of POSTGRESDIR. - - - - Here is how you would specify the various destinations explicitly: - - -% make BINDIR=bindir LIBDIR=libdir HEADERDIR=headerdir install - - - - - For example, typing - - -% make POSTGRESDIR=/opt/psqlodbc install - - - (after you've used - ./configure and make) - will cause the libraries and headers to be installed in the directories - /opt/psqlodbc/lib - and /opt/psqlodbc/include/iodbc respectively. - - - - The command - - -% make POSTGRESDIR=/opt/psqlodbc HEADERDIR=/usr/local install - - - should cause the libraries to be installed in /opt/psqlodbc/lib and - the headers in /usr/local/include/iodbc. If this doesn't work as - expected please contact one of the maintainers. - - - @@ -584,7 +157,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.16 2000/08/29 20:02:07 [ODBC Data Sources] and must contain the following entries: -Driver = POSTGRESDIR/lib/libpsqlodbc.so +Driver = prefix/lib/libpsqlodbc.so Database=DatabaseName Servername=localhost Port=5432 @@ -647,9 +220,101 @@ InstallDir = /opt/applix/axdata/axshlib + + <productname>Windows</productname> Applications + + + In the real world, differences in drivers and the level of + ODBC support + lessens the potential of ODBC: + + + + + Access, Delphi, and Visual Basic all support ODBC directly. + + + + + Under C++, such as Visual C++, + you can use the C++ ODBC API. + + + + + + In Visual C++, you can use the CRecordSet class, which wraps the + ODBC API + set within an MFC 4.2 class. This is the easiest route if you are doing + Windows C++ development under Windows NT. + + + + + + + Writing Applications + + + + If I write an application for Postgres + can I write it using ODBC calls + to the Postgres server, + or is that only when another database program + like MS SQL Server or Access needs to access the data? + + + + The ODBC API + is the way to go. + For Visual C++ coding you can find out more at + Microsoft's web site or in your VC++ docs. + + + + Visual Basic and the other RAD tools have Recordset objects + that use ODBC + directly to access data. Using the data-aware controls, you can quickly + link to the ODBC back end database + (very quickly). + + + + Playing around with MS Access will help you sort this out. Try using + File->Get External Data. + + + + + You'll have to set up a DSN first. + + + + + + + + ApplixWare + + ApplixWare has an + ODBC database interface + supported on at least some platforms. + ApplixWare 4.4.2 has been + demonstrated under Linux with Postgres 7.0 + using the psqlODBC + driver contained in the Postgres distribution. + + Configuration @@ -1089,17 +754,7 @@ endmacro - - Supported Platforms - - psqlODBC has been built and tested - on Linux. There have been reports of success - with FreeBSD and with Solaris. There are no known restrictions - on the basic code for other platforms which already support - Postgres. - - diff --git a/doc/src/sgml/page.sgml b/doc/src/sgml/page.sgml index 0e93f3e4c71..8817c3c290e 100644 --- a/doc/src/sgml/page.sgml +++ b/doc/src/sgml/page.sgml @@ -21,9 +21,6 @@ is assumed to contain 8 bits. In addition, the term refers to data which is stored in Postgres classes. - -Page Structure - The following table shows how pages in both normal Postgres classes and Postgres index @@ -176,50 +173,5 @@ itemPointerData which points to the next piece and the piece itself. The last piece is handled normally. - - - -Files - - - - - -data/ - - - -Location of shared (global) database files. - - - - - - -data/base/ - - - -Location of local database files. - - - - - - - - -Bugs - - -The page format may change in the future to provide more efficient -access to large objects. - - - -This section contains insufficient detail to be of any assistance in -writing a new access method. - - -- cgit v1.2.3