From: | Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | random access - bytea |
Date: | 2003-10-25 15:34:43 |
Message-ID: | Pine.LNX.4.44.0310251715300.23254-100000@zigo.dhs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
There have been (in the past at least) plans on adding a random access
interface to bytea fields. I don't find it in the todo, maybe it should be
added?
What kind of syntax have people thought about, to let the client read a
bytea field in a random access way? I'm thinking of something like:
BEGIN;
SELECT id, open_bytea(bytea_field, READ_ACCESS) FROM table;
... and then the client has to access the data in the same transaction,
using the ID returned by open_bytea() ...
COMMIT;
Would that be feasible? I think it looks like a clean solution. To me
it seems that accessing the data outside a transaction would not be
something we want anyway, right?
Sematically it's easier to implement read access then write access. For
write access to work with transactions one need for example the blocks in
a bytea field to be stored with the transaction id's an stuff (I don't
know these parts of pg internals well enough yet).
One other thing I don't know well enough yet is the new wire protocol. To
support something like above, would it need to be changed? I guess so if
it wasn't designed with this in mind.
--
/Dennis
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-25 15:45:47 | Re: Call for port reports |
Previous Message | Bruce Momjian | 2003-10-25 14:47:32 | Re: Call for port reports |