Re: Feature request: Truncate table - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Feature request: Truncate table
Date
Msg-id 200206122226.g5CMQIE18056@candle.pha.pa.us
Whole thread Raw
In response to Re: Feature request: Truncate table  (Bradley Kieser <brad@kieser.net>)
List pgsql-hackers
Bradley Kieser wrote:
> Well in Ingres there is a WORLD of difference! For a start, you don't 
> lock out the system catalog. Secondly it is an unlogged event, so it 
> beats "delete from table_name" hands down! Then, of course, it preserves 
> all permissions, you keep the same OID, so views, et al, can remain in 
> tact, as with other objects that referece it.
> 
> These are very important considerations in real-world applications esp. 
> when a large number of objects may reference the table.
> 
> 
> Which brings me to another point - I would dearly love to see a 
> "refresh" option based on object name added to the system. This would 
> check all references to a dropped object, by name, and repoint them to 
> the new instance of that object (i.e. if you do a drop/create, it 
> doesn't mess up your entire system if you forgot about a view or three!).

We have actually be moving away from name-based linking so you can
rename tables and things still work.  I can see value in a relinking
system, but we would have to know the old oid and new name, I guess.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: Integrating libpqxx
Next
From: Bruce Momjian
Date:
Subject: Re: Integrating libpqxx