Copying a column into a temp. table - Mailing list pgsql-general

From Alexander Farber
Subject Copying a column into a temp. table
Date
Msg-id AANLkTi=P2yaDCRfare_FXwt94wZYigPy6DAWVXZ5Gg9g@mail.gmail.com
Whole thread Raw
Responses Re: Copying a column into a temp. table  (Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>)
Re: Copying a column into a temp. table  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
How do you copy a column from table please?
I'm trying with PostgreSQL 8.1.21/CentOS 5.5:

# psql -a -f clean-forum.sql
start transaction;
START TRANSACTION
create temp table old_topics (topic_id integer) on commit delete rows;
CREATE TABLE
create temp table old_posts (post_id integer) on commit delete rows;
CREATE TABLE
select topic_id from phpbb_topics where forum_id=5 and topic_poster=1
and age(to_timestamp(topic_time))>interval '14 days' into old_topics;
psql:clean-forum.sql:6: ERROR:  syntax error at or near "into" at character 124
psql:clean-forum.sql:6: LINE 1: ...
age(to_timestamp(topic_time))>interval '14 days' into old_t...
psql:clean-forum.sql:6:
              ^
commit
ROLLBACK

Of course "select ... into" doesn't work, but how should I do it?
Can't find in http://www.postgresql.org/docs/8.1/static/

Thank you
Alex

pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Re: Analyze tool?
Next
From: Gabriele Bartolini
Date:
Subject: Re: Copying a column into a temp. table