Re: Altering existing table to be WITHOUT OIDs
От
Larry Rosenman
Тема
Re: Altering existing table to be WITHOUT OIDs
Дата
Msg-id
1022537728.1578.11.camel@lerlaptop
Ответ на
Re: Altering existing table to be WITHOUT OIDs (Doug Fields)
Список
Дерево обсуждения
Postgres under CygWin "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: Postgres under CygWin Tom Lane <tgl@sss.pgh.pa.us>
Re: Postgres under CygWin Doug Fields <dfields-pg-general@pexicom.com>
Altering existing table to be WITHOUT OIDs Doug Fields <dfields-pg-general@pexicom.com>
Re: Altering existing table to be WITHOUT OIDs Neil Conway <nconway@klamath.dyndns.org>
Re: Altering existing table to be WITHOUT OIDs Doug Fields <dfields-pg-general@pexicom.com>
Re: Altering existing table to be WITHOUT OIDs Tom Lane <tgl@sss.pgh.pa.us>
Removing Referential Integrity Doug Fields <dfields-pg-general@pexicom.com>
Re: Removing Referential Integrity Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Altering existing table to be WITHOUT OIDs Doug Fields <dfields@pexicom.com>
Re: Altering existing table to be WITHOUT OIDs Larry Rosenman <ler@lerctr.org>
On Sat, 2002-05-25 at 15:17, Doug Fields wrote: > 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. Thanks Doug. Worked great for a table I forgot to include the WITHOUT OIDS option on. (gets 4-5000 rows every 5 minutes :-) ). > > Cheers, > > Doug > > > At 04:06 PM 5/24/2002, Tom Lane wrote: > >Doug Fields 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 > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
В списке pgsql-general по дате отправления