Re: TRUNCATE on foreign table

Поиск
Список
Период
Сортировка
От Kazutaka Onishi
Тема Re: TRUNCATE on foreign table
Дата
Msg-id CAJuF6cNVJC5+C2ci0FCgJBpSX8NZF+eaMTbcboDRtTPyagUttA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: TRUNCATE on foreign table  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Ответы Re: TRUNCATE on foreign table  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Список pgsql-hackers
> IIUC, "truncatable" would be set to "false" for relations which do not
> have physical storage e.g. views but will be true for regular tables.

"truncatable" option is just for the foreign table and it's not related with whether it's on a physical storage or not.
"postgres_fdw" already has "updatable" option to make the table read-only.
However, "updatable" is for DML, and it's not suitable for TRUNCATE. 
Therefore new options "truncatable" was added.

Please refer to this message for details.

> DELETE is very different from TRUNCATE. Application may want to DELETE
> based on a join with a local table and hence it can not be executed on
> a foreign server. That's not true with TRUNCATE.

Yeah, As you say, Applications doesn't need  TRUNCATE.
We're focusing for analytical use, namely operating huge data.
TRUNCATE can erase rows faster than DELETE.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Routine usage information schema tables
Следующее
От: Fujii Masao
Дата:
Сообщение: ERROR: invalid spinlock number: 0