I know these threads here and here about pointers in C and printing pointer's address. I want to store the pointer to the postgreSQL 9.4 database with a partial index because selection is always from a small subset of the whole data and entries are always selected in order in interals from the database.
I have a big file where I know two byte positions of the event interval: end and start. I know also the maximum file size:
## Pointer to that interval
# Start index in dec: 140
# End index in dec: 666
# File size is : 241520288
Table events and its eventPointer field
CREATE TABLE events
(
event_id SERIAL PRIMARY KEY NOT NULL,
measurement_id INTEGER NOT NULL,
eventPointer POINTER NOT NULL, -- TODO here for type!
is_active BOOLEAN DEFAULT FALSE
);
where I am not sure about the datatype and how it is efficient to store such an data interval for the partial index. The partial index is created by
CREATE UNIQUE INDEX dir_events
ON events (measurement_id)
USING btree
(eventPointer)
WHERE is_active;
I can store these as figures but would like to have a direct pointer to the specific interval. I would like store pointers to the big file in partial index such that I can do fast selections. It may be possible that postgreSQL can do these pointers itself.
How can you store pointer in PostgreSQL's partial index?