postgresql/src/interfaces/odbc
Hiroshi Inoue c2f5d08c11 Fix a lot of compile errors on unix.
Fix '\\' handling for bytea type.
2001-08-21 05:21:09 +00:00
..
bind.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
bind.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
columninfo.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
columninfo.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
connection.c Add SCM_CREDS to get owner of unix-domain socket on BSD-like systems. 2001-08-21 00:33:28 +00:00
connection.h Add SCM_CREDS to get owner of unix-domain socket on BSD-like systems. 2001-08-21 00:33:28 +00:00
convert.c Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
convert.h Get rid of the following size limit. 2001-05-25 08:12:32 +00:00
dlg_specific.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
dlg_specific.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
drvconn.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
environ.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
environ.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
execute.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
GNUmakefile Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
gpps.c Fix compile error caused by patch application. 2001-06-12 21:51:27 +00:00
gpps.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
info.c Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
iodbc.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
isql.h Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
isqlext.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
license.txt
lobj.c Run pgindent on ODBC code only, to reformat new comments. 2001-05-08 17:12:36 +00:00
lobj.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
misc.c Run pgindent on ODBC code only, to reformat new comments. 2001-05-08 17:12:36 +00:00
misc.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
multibyte.c Run pgindent on ODBC code only, to reformat new comments. 2001-05-08 17:12:36 +00:00
multibyte.h BTW it does not add encodign it just patches existing one (KOI8) to 2001-05-03 21:38:45 +00:00
notice.txt
odbc.sql Move contrib/odbc/odbc.sql together with odbc driver, remove old files; 2000-09-18 20:11:37 +00:00
odbcapi30.c Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
odbcapi.c Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
odbcinst.ini
options.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
parse.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
pgapifunc.h Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
pgtypes.c Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
pgtypes.h A patch to fix the following bugs. 2001-04-23 01:00:49 +00:00
psqlodbc.c ODBC source code cleanup patch. Should match rest of PostgreSQL code better. 2001-05-08 17:06:18 +00:00
psqlodbc.def 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
psqlodbc.h 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
psqlodbc.rc Handle Procedure calls. 2001-06-27 07:38:07 +00:00
psqlodbc.reg The attached file contains the registry settings required to install the 2001-03-13 09:03:24 +00:00
qresult.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
qresult.h 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
readme.txt The renewal of README thanks to Dave Page. 2001-04-17 07:30:53 +00:00
resource.h pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
results.c 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
setup.c Run pgindent on ODBC code only, to reformat new comments. 2001-05-08 17:12:36 +00:00
setup.rul Update 06-40-0003 1999-01-06 20:44:08 +00:00
socket.c Corrected the check for *message truncated* for the future use. 2001-06-19 03:17:12 +00:00
socket.h Changed the error handling as follows. 2001-06-19 02:17:06 +00:00
statement.c Fix a lot of compile errors on unix. 2001-08-21 05:21:09 +00:00
statement.h 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00
TODO.txt
tuple.c ODBC source code cleanup patch. Should match rest of PostgreSQL code better. 2001-05-08 17:06:18 +00:00
tuple.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
tuplelist.c Run pgindent on ODBC code only, to reformat new comments. 2001-05-08 17:12:36 +00:00
tuplelist.h ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
win32.mak 1) Change all internal SQL function calls from 2001-08-18 04:30:47 +00:00

Readme for psqlodbc.dll                                                  04/04/2001
-----------------------------------------------------------------------------------
Precompiled binaries for Win32 are available from ftp://ftp.postgresql.org/pub/odbc


I.  Building the Driver from the source code

This section describes how to build the PostgreSQL ODBC Driver (psqlodbc.dll).
Microsoft Visual C++ version 4.0 or higher is required. Other compilers may work 
but have not been formally tested. The psqlodbc.dll may be built either in the 
VC++ IDE or from the command line:

IDE Method
----------

1.  Create a new project workspace with the type DLL.  For the name, type in the
    name "psqlodbc".

2.  The above step creates the directory "psqlodbc" under the 
    "\<Visual C++ top level directory>\projects" path to hold the source files.
    (example, \msdev\projects\psqlodbc).  Now, either unzip the source code release
    into this directory or just copy all the files into this directory.

3.  Insert all of the source files (*.c, *.h, *.rc, *.def) into the Visual project
    using the "Insert files into project" command.  You may have to do 2 inserts --
    the first to get the 'c' and header files, and the second to get the def file.
    Don't forget the .def file since it is an important part of the release.
    You can even insert ".txt" files into the projects -- they will do nothing.
	
4.  Add the "wsock32.lib" library to the end of the list of libraries for linking
    using the Build settings menu.
	
5.  Select the type of build on the toolbar (i.e., Release or Debug).  This is
    one of the useful features of the visual c++ environment in that you can
    browse the entire project if you build the "Debug" release.  For release
    purposes however, select "Release" build.

6.  Build the dll by selecting Build from the build menu.

7.  When complete, the "psqlodbc.dll" file is under the "Release" subdirectory.
    (i.e., "\msdev\projects\psqlodbc\release\psqlodbc.dll")

Command Line Method
-------------------

1.  From a command prompt, CD to the directory containing the source code.

2.  Use NMAKE to build the dll eg:

    C:\psqlodbc\> nmake /f win32.mak CFG=Release ALL

    Possible configurations are Release, Debug, MultiByteRelease or MultiByteDebug
    Possible build types are ALL or CLEAN


II.  Using Large Objects for handling LongVarBinary (OLE Objects in Access)

Large objects are mapped to LONGVARBINARY in the driver to allow storing things like
OLE objects in Microsoft Access.  Multiple SQLPutData and SQLGetData calls are usually
used to send and retrieve these objects.  The driver creates a new large object and simply
inserts its 'identifier' into the respective table.  However, since Postgres uses an 'Oid'
to identify a Large Object, it is necessary to create a new Postgres type to be able
to discriminate between an ordinary Oid and a Large Object Oid.  Until this new type
becomes an official part of Postgres, it must be added into the desired database and
looked up for each connection.  The type used in the driver is simply called "lo" and
here is the command used to create it:

create type lo (internallength=4,externallength=10,input=int4in,output=int4out,
                default='',passedbyvalue);

Once this is done, simply use the new 'lo' type to define columns in that database.  Note
that this must be done for each database you want to use large objects in with the driver.
When the driver sees an 'lo' type, it will handle it as LONGVARBINARY.

Another important note is that this new type is lacking in functionality.  It will not
cleanup after itself on updates and deletes, thus leaving orphans around and using up
extra disk space.  And currently, Postgres does not support the vacuuming of large
objects.  Hopefully in the future, a real large object data type will be available.

But for now, it sure is fun to stick a Word document, Visio document, or avi of a dancing
baby into a database column, even if you will fill up your server's hard disk after a while!