Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UAllI-0000Yc-F0 for pgsql-admin@arkaria.postgresql.org; Wed, 27 Feb 2013 18:29:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UAllH-0002X5-7Y for pgsql-admin@arkaria.postgresql.org; Wed, 27 Feb 2013 18:29:51 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UAll6-0002Mv-5W for pgsql-admin@postgresql.org; Wed, 27 Feb 2013 18:29:40 +0000 Received: from www.ipv6.roaringpenguin.com ([2607:f748:1200:fb:70:38:112:54] helo=colo3.roaringpenguin.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UAll4-00086i-69 for pgsql-admin@postgresql.org; Wed, 27 Feb 2013 18:29:39 +0000 Received: from vanadium.roaringpenguin.com ([192.168.10.23]) by colo3.roaringpenguin.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r1RITa20007039 for ; Wed, 27 Feb 2013 13:29:36 -0500 Received: from hydrogen.roaringpenguin.com (dfs@hydrogen.roaringpenguin.com [192.168.10.1]) by vanadium.roaringpenguin.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r1RITZqb012878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Wed, 27 Feb 2013 13:29:35 -0500 Date: Wed, 27 Feb 2013 13:29:35 -0500 From: "David F. Skoll" To: pgsql-admin@postgresql.org Subject: CREATE TABLE LIKE and tablespaces Message-ID: <20130227132935.44fc25f1@hydrogen.roaringpenguin.com> Organization: Roaring Penguin Software Inc. X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=roaringpenguin.com; h=date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=main; bh=owTasez2Te+ukQLDsGvGEjspV rQ=; b=tN1ROrXIXbFTtbh2UzV3HiGkAgQQpTTYlLQjWlw+eL8MYK/vz37hAMpLa dHv4586Z6aub0gLSrU8oltpbo0FuctSvF+z+e61vDRkDFc6zHOHpkCU2ZAI2enV1 Qmitb66wQBw+7q/3qQYyCIPRzRzkOHBWOTxYRH5E6kDZLomA0D0MqjPVd1vsOw2m 1NiW/BW9ENu+GlWqrh2Ubeq+jcCjr3KjV+yg4zesAOtlMQeD2uCcUlm3PDcT4Krm XV3eemjElku9+G0Y0uIwJtZybB45JwtGAVm5w0uU/GK0dO3P8jzXM+XRxTCkDwK7 /A9bS9UKxRMT/Pi/3EKyKb53vk/Jw== X-Scanned-By: CanIt (www . roaringpenguin . com) X-Scanned-By: MIMEDefang 2.73 on 192.168.10.23 X-Spam-Score: undef - relay 192.168.10.23 marked with skip_spam_scan X-CanIt-Geo: No geolocation information available for 192.168.10.23 X-CanItPRO-Stream: outgoing (inherits from default) X-CanIt-Archive-Cluster: SQVyZJxqklY5buiWXYCN4T/BjiM X-CanIt-Archived-As: base/20130227 / 01J5utAHb X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi, I have an application that creates a daily table from a "prototype" table, so something like: CREATE TABLE data_20130226 LIKE data_prototype INCLUDING DEFAULTS INCLUDING CONSTRATINTS INCLUDING INDEXES; It would be really nice to be able to add: INCLUDING TABLESPACE so that the daily table goes into the same table space as the prototype table. I can give a specific "TABLESPACE tablespace" clause, but then my application needs to be aware that data_prototype is not in the default tablespace. Ideally, I'd like the admin to be able to move data_prototype into an alternate tablespace and have all the daily tables be created in that same tablespace. I suppose similar comments apply to INHERITS. Thoughts? Regards, David. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin