Re: Truncate if exists

Josh Berkus <josh@agliodbs.com>

From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Date: 2012-10-10T16:57:06Z
Lists: pgsql-hackers
On 10/9/12 1:35 PM, Peter Eisentraut wrote:
> On 10/9/12 5:09 AM, Simon Riggs wrote:
>> Anyone want to check for any other missing IF EXISTS capability in other DDL?
> 
> TRUNCATE is not really DDL.  If we allow TRUNCATE IF EXISTS, what is
> stopping someone from requesting DELETE IF EXISTS or INSERT IF EXISTS next?

That's a very good point.  I tend to think of all utility commands as
DDL, which of course they're not.


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com