Re: Altering existing table to be WITHOUT OIDs

Поиск
Список
Период
Сортировка
От Doug Fields
Тема Re: Altering existing table to be WITHOUT OIDs
Дата
Msg-id 5.1.0.14.2.20020525161613.02c4f8c8@mail.pexicom.com
обсуждение исходный текст
Ответ на Re: Altering existing table to be WITHOUT OIDs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Altering existing table to be WITHOUT OIDs  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-general
For the benefit for anyone who may search this list in the future for this
information, I used the following queries to implement Tom's suggestion on
the table "list_entries" in this example:

UPDATE pg_class SET relhasoids=false WHERE relname='list_entries';
DELETE FROM pg_attribute
     WHERE attrelid = (SELECT oid FROM pg_class WHERE relname =
'list_entries')
         AND attname='oid';

You might want to also include the reltype in the sub-SELECT if you re-use
names willy-nilly.

Cheers,

Doug


At 04:06 PM 5/24/2002, Tom Lane wrote:
>Doug Fields <dfields-pg-general@pexicom.com> writes:
> > The documentation does not give any information about how I might do this
> > in the ALTER TABLE, so it may not be possible, at least, not that way.
>
>ALTER TABLE doesn't support it, but you could reach in and tweak
>pg_class.relhasoids for your tables.  I think you would also need to
>delete the pg_attribute row for oid for each such table if you wanted
>to have a perfectly clean result.
>
>                         regards, tom lane



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

Предыдущее
От: NunoACHenriques
Дата:
Сообщение: is there any backend (server) timeout undocumented?
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: RPM for latest version of Postgres