Re: How can i get record by data block not by sql?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: How can i get record by data block not by sql?
Дата
Msg-id 4E8A7623.5010207@ringerc.id.au
обсуждение исходный текст
Ответ на How can i get record by data block not by sql?  ("姜头" <104186179@qq.com>)
Список pgsql-general
On 03/10/11 17:03, 姜头 wrote:
How can i get record by data block not by sql?
 
I want to read and write lots of data by data blocks, so i can form a disk-resident tree by recording the block address. But i don't know  how to implement in postgresql.
Is there system function can do this?

It might be a good idea to take a step or three back and ask: "Why?"

What are you trying to achieve? What is the goal?

Is PostgreSQL the right choice? Have you looked at lower-level databases like Berkeley DB, various raw ISAM engines, etc? For that matter, if you want block-level operation, don't you really just want pread() and pwrite()?

If you want to do something within the PostgreSQL engine using your own custom files to store data, you would have to do it by writing C functions as server-side extensions and calling those via SQL to access and manage your data. These functions would have to use their own separate data; they could **NOT** safely use existing postgresql data files in any way.

--
Craig Ringer

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

Предыдущее
От: Rodrigo Gonzalez
Дата:
Сообщение: Re: stored function (possible to access file system or call java program)?
Следующее
От: Venkat Balaji
Дата:
Сообщение: Re: : PostgreSQL Online Backup