Re: "truncate all"?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, shridhar_daithankar(at)persistent(dot)co(dot)in, pgsql-hackers(at)postgresql(dot)org
Subject: Re: "truncate all"?
Date: 2003-08-17 04:42:06
Message-ID: 8824.1061095326@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> On Sun, 17 Aug 2003, Bruce Momjian wrote:
>> Is this a bug?

> I don't think so. I'd say this is the expected behavior. Part of the
> point is that it fails without checking for matching rows.

To do anything else, you'd have to solve some locking and/or
race-condition problems: rows could be inserted in the other table
while the TRUNCATE runs.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-17 04:43:03 Re: Question with hashed IN
Previous Message Bruce Momjian 2003-08-17 04:39:53 Re: poorly written builtin functions