On 2011-05-26, Bosco Rama <postgres@xxxxxxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general