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