Re: copy record?

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: copy record?
Дата
Msg-id irna9r$dso$3@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на copy record?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы 500KB PDF files for postgresql8.3, which is the most efficient way?
Список pgsql-general
On 2011-05-26, Bosco Rama <postgres@boscorama.com> wrote:

>   select * into temp table foo from maintable where primcol=123;
>   update foo set primcol = 456;
>   insert into maintable select * from foo;
>
> You also may need this is if you intend to use the same sequence of
> calls on within the same session:
>
>   drop table foo;

Yet another way to do the same thing:

begin;

create temportary table foo on commit drop as
 select * from maintable where primcol=123;
update foo, set primcol=456;
insert into maintable select * from foo;

commit;

--
⚂⚃ 100% natural

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

Предыдущее
От: A B
Дата:
Сообщение: Feature request: Replicate only parts of a database
Следующее
От: David Fetter
Дата:
Сообщение: Re: unnest with generate_subscripts and same array