Re: [GENERAL] Move rows from one database to other

Поиск
Список
Период
Сортировка
От Thomas Güttler
Тема Re: [GENERAL] Move rows from one database to other
Дата
Msg-id 95241ec8-4900-7eef-7dbe-c868c5ce20d5@thomas-guettler.de
обсуждение исходный текст
Ответ на Re: [GENERAL] Move rows from one database to other  (Leknín Řepánek <godzilalalala@gmail.com>)
Ответы Re: [GENERAL] Move rows from one database to other
Список pgsql-general

Am 23.02.2017 um 13:44 schrieb Leknín Řepánek:
> Maybe you can do something like
>
> WITH cte AS (
> DELETE FROM t1 WHERE cond
> RETURNINIG *
> )
> INSERT into t2
> SELECT * FROM cte;
>
> To move rows between tables with combination with fdw_postgres and
> foreign table.


... this way you don't need the second table ... nice.


--
Thomas Guettler http://www.thomas-guettler.de/


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

Предыдущее
От: Thomas Güttler
Дата:
Сообщение: Re: [GENERAL] Move rows from one database to other
Следующее
От: Ertan Küçükoğlu
Дата:
Сообщение: Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie - solved