CREATE TABLE AS and tablespaces - Mailing list pgsql-sql

From Markus Schaber
Subject CREATE TABLE AS and tablespaces
Date
Msg-id 43FEE3AD.6080208@logix-tt.com
Whole thread Raw
Responses Re: CREATE TABLE AS and tablespaces
List pgsql-sql
Hello,

Recently, I wanted to create a table from a complex query in a specific
tablespace, but CREATE TABLE name AS SELECT ... does not accept a
tablespace argument.

I worked around it by CREATE TABLE name AS SELECT ... LIMIT 0, then
moving the generated table to the other tablespace using ALTER TABLE,
and then using INSERT INTO ... SELECT to generate the data into the table.

But nevertheless, I'd like to ask here whether there are specific
reasons for omitting the tablespace argument from the CREATE TABLE AS
statement. If not, I'd like to request this minor feature :-)

Maybe it is even possible to further unify CREATE TABLE and CREATE TABLE AS.

Thanks,
Schabi
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


pgsql-sql by date:

Previous
From: "Owen Jacobson"
Date:
Subject: Re: Question about index scan vs seq scan when using count()
Next
From: Richard C
Date:
Subject: "Installing" dbLink