Skip site navigation (1) Skip section navigation (2)

Re: ALTER TABLE .. < ADD | DROP > OIDS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)rbt(dot)ca>,Pgsql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: ALTER TABLE .. < ADD | DROP > OIDS
Date: 2002-12-06 05:08:02
Message-ID: 200212060508.gB6582a13580@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Bruce Momjian wrote:
> 
> OK, patch applied and tested.

Sorry, wrong email.  I meant to say that his previous ALTER DOMAIN patch
had been applied with the new file now supplied.


> 
> ---------------------------------------------------------------------------
> 
> Rod Taylor wrote:
> -- Start of PGP signed section.
> > I wish to create an alter command which will allow a table to have OIDs
> > added or removed.
> > 
> > 
> > The tricky part appears to be changing the tuples themselves.  I believe
> > if I pull the same trick that cluster does (create new file, copy
> > tuples, etc) it can be done fairly easily.
> > 
> > First, set up pg_class appropriately (oid flag).
> > 
> > Second, copy out tuples from oldfile to newfile, running a
> > heap_deformtuple() -> heap_formtuple() process on each.  Since
> > heap_deformtuple only deals with positive numbered attributes
> > (non-system attributes) this should be safe to do on a mis-configured
> > relation.  heap_formtuple completes the dirty work of setting up the OID
> > column appropriately.
> > 
> > -- 
> > Rod Taylor <rbt(at)rbt(dot)ca>
> > 
> > PGP Key: http://www.rbt.ca/rbtpub.asc
> -- End of PGP section, PGP failed!
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-performance by date

Next:From: john cartmellDate: 2002-12-06 11:32:04
Subject: Re: ORDER BY ... LIMIT.. performance
Previous:From: Bruce MomjianDate: 2002-12-06 05:00:14
Subject: Re: ALTER TABLE .. < ADD | DROP > OIDS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group