Re: pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils. - Mailing list pgsql-committers

From Simon Riggs
Subject Re: pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils.
Date
Msg-id 1216239204.19656.416.camel@ebony.2ndQuadrant
Whole thread Raw
In response to pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils.  (momjian@postgresql.org (Bruce Momjian))
Responses Re: pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils.
List pgsql-committers
On Wed, 2008-07-16 at 16:54 +0000, Bruce Momjian wrote:
> Log Message:
> -----------
> Allow TRUNCATE foo, foo to succeed, per report from Nikhils.

What's the use case for this?

It's not compatibility, is it? Why would you ever do that? If you did,
why would you expect it to work? Seems more likely to be a user error
than a real request.

Should it throw one trigger call, or two?

BTW, create index foo_idx on foo (col1, col1) fails also with a strange
error message. Should we silently merge columns and ignore that also?

ERROR:  duplicate key value violates unique constraint
"pg_attribute_relid_attnam_index"

Seems easier to throw errors for weird DDL like this.

e.g. create index concurrently on foo (col1); creates an index called
"concurrently" on foo, while holding locks...

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix previous patch so that it actually works --- consider
Next
From: Bruce Momjian
Date:
Subject: Re: pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils.