Re: "truncate all"?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: "truncate all"?
Дата
Msg-id 200308170418.h7H4IKi08093@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: "truncate all"?  (Robert Treat <xzilla@users.sourceforge.net>)
Ответы Re: "truncate all"?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-hackers
Is this a bug?

---------------------------------------------------------------------------

Robert Treat wrote:
> On Mon, 2003-08-04 at 12:19, Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > This this a TODO?  Keep in mind if we follow the syntax of VACUUM and
> > > (7.4) CLUSTER, that the all-database truncate would just be "TRUNACATE".
> > > That seems very risky to me.  I wonder if the risk is worth adding this
> > > feature.
> > 
> > I wouldn't care for that either.  The prior suggestion of "TRUNCATE tab
> > CASCADE" (to truncate any tables with FK dependencies on the original
> > target, instead of failing) seems more reasonable.
> > 
> 
> Actually there seems to be an ancillary issue here:
> 
> 21809=# truncate exception;
> ERROR:  TRUNCATE cannot be used as table exception_notice_map references
> this one via foreign key constraint $1
> 21809=# TRUNCATE exception_notice_map ;
> TRUNCATE TABLE
> 21809=# truncate exception;
> ERROR:  TRUNCATE cannot be used as table exception_notice_map references
> this one via foreign key constraint $1
> 21809=# select count(*) from exception_notice_map;
>  count 
> -------
>      0
> (1 row)
> 
> 21809=# 
> 
> Robert Treat
> -- 
> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

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


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: "truncate all"?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: DROP TYPE/DROP DOMAIN