Return-Path: owner-postman 
Delivery-Date: Tue, 25 Jan 94 09:53:38 -0800
Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id JAA13299 for postgres-list; Tue, 25 Jan 1994 09:52:39 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199401251752.JAA13299@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from gimli.trillium.com (gimli.trillium.com [198.242.58.4]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id JAA13284 for <postgres@nobozo.CS.Berkeley.EDU>; Tue, 25 Jan 1994 09:52:10 -0800
Received: by trillium.com (5.0/SMI-SVR4)
	id AA02061; Tue, 25 Jan 1994 09:51:41 +0800
Date: Tue, 25 Jan 1994 09:51:41 +0800
From: fmg@trillium.com
Message-Id: <9401251751.AA02061@trillium.com>
To: postgres@postgres.Berkeley.EDU
Subject: Inversion Files...
X-Sun-Charset: US-ASCII
content-length: 2189
Resent-To: postgres-list@postgres.Berkeley.EDU
Resent-Date: Tue, 25 Jan 94 09:52:39 -0800
Resent-XMts: smtp

I have some conceptual questions about the Inversion Filesystem.

If I set up a class that has a Inversion file as an attribute ala

create File 
(
   name = text,
   ifile = InvFile
) \g

My I/O functions inv_file_in and inv_file_out do the following

inv_file_in 
   Check for inversion file's existance with LOstat();
   If it doesn't exist: 
      LOcreat(fName, INV_READ|INV_WRITE|INV_ARCHIVE, Inversion).
      read from a unix file, write to the inversion file.
      close both files.
      Fill my IFile struct (varlena) and return.
   If it does exist, fill my IFile struct (varlena), and return;

inv_file_out
   return the name component of my IFile struct


I also defined a function inv_file_eq() which compares the names of
two files for equality.

Now, some questions...

   When I append new touples to the table, a new inversion file
   is created on the system. I can see these files with 
   $POSTGRESHOME/bin/pls. I added the LOstat call to inv_file_in
   because it is called when I test for equality, and I can't recreate
   the file (nor would I want to). Is this reasonable?

   Next, I can do historical queries on this table, and see all versions
   of the table over time as I append and replace touples. Now, how do
   I retrieve an old version of the actual inversion file itself rather
   than its representation in the table which is merely its name, and may
   be the same at different time though the contents may be different.

   How do I do the same thing from libpq?

   I'd also be interested to hear how people who have used the inversion
   file system have set up their tables and input/output routines to support
   their conceptual models...

   Perhaps I'm just confused about how Inversion file are supposed to be used?


   Thanks,
   Frank
+--------------------------------------+--------------------------------------+
|Frank M. Goodman                      |         Trillium Digital Systems Inc.|
|f_goodman@trillium.com                |       2001 S. Barrington Ave, Ste 215| 
|Ph: 310 479-0500, Fax: 310 575-0172   |         Los Angeles, California 90025|
+--------------------------------------+--------------------------------------+

