Re: Getting the OID inside the executor

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting the OID inside the executor
Дата
Msg-id 5085.1314939817@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting the OID inside the executor  (Fazool <fazoolmein@gmail.com>)
Ответы Re: Getting the OID inside the executor
Список pgsql-hackers
Fazool <fazoolmein@gmail.com> writes:
> I am implementing some functionality into Postgresql, where I want to
> track which row was accessed by a user query. I am implementing the
> functionality inside Postgres, so that there are no changes required
> on client side (e.g. re-writing queries).
> Rows are identified by OIDs, and I have set default_with_oids=true, so
> that all tables are created with OIDs.

It's a serious, serious error to suppose that OIDs are adequate
identifiers for rows in user tables.

We use OIDs to identify rows in system catalogs.  We can get away with
that, more or less, because (a) system catalogs are not likely to
contain billions of rows, and (b) we place a unique index on OID on
every system catalog that has OIDs.  Neither of these statements is
very tenable for user tables.

You haven't said anything about what it is you actually need to
accomplish here, but can you use TIDs as row identifiers?  What's
the required lifetime of the identifiers?
        regards, tom lane


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

Предыдущее
От: Fazool
Дата:
Сообщение: Getting the OID inside the executor
Следующее
От: Fazool
Дата:
Сообщение: Re: Getting the OID inside the executor