pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Mark Stosberg <mark@summersault.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Re: best practice for moving millions of rows to child table when setting up partitioning?
Date: Wed, 04 May 2011 13:54:20 -0400
Message-ID: <14665.1304531660@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTinieDbJ5dabJDX7v_JzTGSkKxpsMA@mail.gmail.com>
References: <ip9abr$nk8$1@dough.gmane.org>
	<659395.83416.qm@web39708.mail.mud.yahoo.com>
	<ips01d$351$1@dough.gmane.org>
	<BANLkTinRFTF0ywHQua9ZgJ28sEqdKxNHXA@mail.gmail.com>
	<ips0v8$8ut$1@dough.gmane.org>
	<BANLkTinieDbJ5dabJDX7v_JzTGSkKxpsMA@mail.gmail.com>

Scott Marlowe <scott.marlowe@gmail.com> writes:
> On Wed, May 4, 2011 at 11:04 AM, Mark Stosberg <mark@summersault.com> wrote:
>> Further, since TRUNCATE permanently and instantly deletes mass amounts
>> of data, I would hope that it would provide "safety" by default, but
>> only truncating one table unless I specify otherwise.

The reason it works like that is that the SQL standard says so :-(
There was considerable angst about this when we made TRUNCATE recurse
to children, IIRC, but we decided we had to make it work that way.

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <14665.1304531660@sss.pgh.pa.us>
Permalink:  ../14665.1304531660@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14665.1304531660@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, scott.marlowe@gmail.com, mark@summersault.com
  Subject: Re: Re: best practice for moving millions of rows to child table when setting up partitioning?
  In-Reply-To: <14665.1304531660@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox