From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | 姜头 <104186179(at)qq(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How can i get record by data block not by sql? |
Date: | 2011-10-04 02:57:39 |
Message-ID: | 4E8A7623.5010207@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Venkat Balaji | 2011-10-04 05:08:51 | Re: : PostgreSQL Online Backup |
Previous Message | Rodrigo Gonzalez | 2011-10-04 01:00:33 | Re: stored function (possible to access file system or call java program)? |