From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Murat Tuncer <mtuncer(at)citusdata(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: truncate trigger for foreign data wrappers |
Date: | 2016-08-05 18:05:02 |
Message-ID: | CA+TgmoaQhDwCOiXOKEU2LhDOBZuQbMVvuvEdaM2uby7Rinb4=w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 5, 2016 at 2:04 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2016-08-05 13:32:18 -0400, Robert Haas wrote:
>> I think if we're going to add support utility commands on foreign
>> tables, we ought to think about all of the different utility commands
>> that someone might want and what exactly we want the behavior to be.
>
>> For example, consider CLUSTER or CREATE INDEX or VACUUM or ANALYZE.
>> We might interpret TRUNCATE or CLUSTER as a request to dispatch the
>> same request for the remote side, but ANALYZE can't mean that: it has
>> to mean gather local statistics. And what if the other side is not PG
>> and supports other operations that we don't have, like OPTIMIZE TABLE
>> or DISENGAGE FTL?
>
> That's not really comparable imo - we don't have triggers for those
> locally either. For better or worse we've decided that TRUNCATE is more
> like DML than DDL.
I agree, but I still think it's weird if foreign tables support
TRUNCATE itself not but triggers on TRUNCATE. And I don't want to
start supporting TRUNCATE itself without a bit more thought about
where we go from there.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-08-05 18:07:18 | Re: pg_size_pretty, SHOW, and spaces |
Previous Message | Andres Freund | 2016-08-05 18:04:06 | Re: truncate trigger for foreign data wrappers |