random access - bytea

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема random access - bytea
Дата
Msg-id Pine.LNX.4.44.0310251715300.23254-100000@zigo.dhs.org
обсуждение исходный текст
Ответы Re: random access - bytea  (Joe Conway <mail@joeconway.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Call for port reports
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Call for port reports