head	1.2;
access;
symbols
	REL-09_01_0200:1.2
	REL-09_01_0100:1.2
	REL-09_00_0310:1.2
	REL-09_00_0300:1.2
	REL-09_00_0200:1.2
	REL-09_00_0101:1.2
	REL-09_00_0100:1.2
	REL-08_04_0200:1.2
	REL-08_04_0100:1.2
	REL-08_03_0400:1.2
	REL-08_03_0300:1.2
	REL-08_03_0200:1.2
	REL-08_03_0100:1.2
	REL-08_02_0500:1.2
	REL-08_02_0400:1.2
	REL-08_02_0300:1.2
	REL-08_02_0200:1.2
	REL-08_02_0100:1.2
	REL8_1_STABLE:1.2.0.2
	REL-08_01_0200:1.2
	REL-08_01_0102:1.2
	REL-08_01_0101:1.2
	REL-08_01_0100:1.2
	REL-08_01_0006:1.2
	REL-08_01_0005:1.2
	REL-08_01_0004:1.1;
locks; strict;
comment	@# @;


1.2
date	2005.10.11.07.47.11;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2005.08.27.20.14.55;	author dpage;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Fix spelling of PostgreSQL.
@
text
@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    <title>psqlODBC HOWTO - Access Large Objects</title>
  </HEAD>

  <body bgcolor="#ffffff" text="#000000" link="#ff0000" vlink="#a00000" alink="#0000ff">
  
<h1>psqlODBC HOWTO - Access Large Objects</h1>

<p>

<i>
Author: Unknown<br>
Release Date: Unknown<br>
Description: Using large objects in Microsoft Access (notes from the original psqlODBC docs)
</i>
<br><br>

<h2>Using Large Objects for handling LongVarBinary (OLE Objects in Access)</h2>

<p>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 PostgreSQL uses an 'Oid'
to identify a Large Object, it is necessary to create a new PostgreSQL type to be able
to discriminate between an ordinary Oid and a Large Object Oid.  Until this new type
becomes an official part of PostgreSQL, 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:</p>

<blockquote>
<pre>
create type lo (
    internallength=4,
    externallength=10,
    input=int4in,
    output=int4out,
    default='',
    passedbyvalue
);
</pre>
</blockquote>

<p>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.</p>

<p>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, PostgreSQL does not support the vacuuming of large
objects.  Hopefully in the future, a real large object data type will be available.</p>

<p>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!</p>

</body>
</html>
@


1.1
log
@Further documentation updates
@
text
@d21 11
a31 11
<h2>Using Large Objects for handling LongVarBinary (OLE Objects in Access)</h2>

<p>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:</p>
d34 1
a34 1
<pre>
d39 1
a39 1
    output=int4out,
d42 1
a42 1
);
d45 11
a55 11

<p>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.</p>

<p>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.</p>

<p>But for now, it sure is fun to stick a Word document, Visio document, or avi of a dancing
d59 1
a59 1
</html>@

