copying data between tables

Поиск
Список
Период
Сортировка
От Tsirkin Evgeny
Тема copying data between tables
Дата
Msg-id opr30cdaj0jbdarf@localhost
обсуждение исходный текст
Ответы Re: copying data between tables
Список pgsql-admin
Hi all!
I have the following task :
I have some tables edited (insert/update) by users.
I should create a file (in whatever format) containing
changes of the last day,every day.What I have currently
is :
I have two tables of the same structer ,every day i :

select * from newtable
except
select * from oldtable

And then format the data with perl script.After that ,i
am copying the data from the new table to the old table .It
works pretty good except that the copying is VERY slow:
I use :
insert into old from (select * from newtable);

Is there any more afficient way to do what i need ,
that somebody already use?
Is there any more afficient way to copy data between
tables?
I know that i can use COPY to copy files from
and to files ,can it be used here?


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

Предыдущее
От: Chris Gamache
Дата:
Сообщение: Re: Any Gentoo users interested in a slotted PostgreSQL
Следующее
От: "scott"
Дата:
Сообщение: unsubscribe