X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E80F39DC8D9 for ; Fri, 24 Feb 2006 06:45:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98266-04 for ; Fri, 24 Feb 2006 06:45:03 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (serval.logix-tt.com [213.239.221.42]) by postgresql.org (Postfix) with ESMTP id 47E219DC816 for ; Fri, 24 Feb 2006 06:44:58 -0400 (AST) Received: from kingfisher.intern.logix-tt.com (Mee68.m.pppool.de [89.49.238.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 6E0B024407F; Fri, 24 Feb 2006 11:44:59 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id A3E04184C1625; Fri, 24 Feb 2006 11:45:02 +0100 (CET) Message-ID: <43FEE3AD.6080208@logix-tt.com> Date: Fri, 24 Feb 2006 11:45:01 +0100 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: PostgreSQL SQL List Subject: CREATE TABLE AS and tablespaces X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.123 required=5 tests=[AWL=0.123] X-Spam-Score: 0.123 X-Spam-Level: X-Archive-Number: 200602/292 X-Sequence-Number: 24302 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