Subject: no subject (file transmission)

From: Kent Archie <[email-masked]>
Date: Fri, 13 Nov 92 11:55:45 CST

A month or so ago I posted a question similar to this one.
I got a response that was helpful but the problem is not
quite solved so I will try a more detailed question.

Imagine I have two tables, the first is a table of source code (SRC)
deltas and has three fields:
filename   text
delta      text
delta_num  int4

The second table is dataflow graph deltas (DFG) and has the same fields.

The DFG table is dependent of the SRC table in the sense that 
if tuples are added to the SRC table, corresponding ones should
be added to the DFG table.

Assume that the highest SRC delta number is 4 and the highest
DFG delta number is 2.
What I want to happen is this:
If a query is run against DFG for delta number 4,
the system (Postgres, I hope) detects this and issues
commands to generate the missing DFG deltas from the corresponding
SRC deltas.

What I have tried on the real system that this approximates is
to set up a query rule that is triggered on retrieve for the DFG
table. This rule executes C code to query the SRC table for the 
tuples between 3 and 4 and calculate the corresponding
DFG tuples. These are then appended to the DFG table and the query
completed.
The problem I saw with this is that the append generated
as a result of the query could not be completed, apparently
because the table was in use by the original DFG query.
It is as if Postgres put a read-lock on the DFG table when the original
query was executed and this prevents the appends from happening.

This kind of activity is crucial to my application.
I have a way around it but it relegates Postgres to 
being a static repository of data. I was hoping to get
it more actively involved in the processing of the data.

Any ideas?
**kent
Kent Archie
[email-masked]