Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0aE3-0000yc-9a for pgsql-sql@arkaria.postgresql.org; Thu, 04 Jun 2015 18:50:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z0aE2-0001Cp-QQ for pgsql-sql@arkaria.postgresql.org; Thu, 04 Jun 2015 18:50:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z0aE1-0001Cj-Un for pgsql-sql@postgresql.org; Thu, 04 Jun 2015 18:50:46 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z0aDw-0006Cx-HW for pgsql-sql@postgresql.org; Thu, 04 Jun 2015 18:50:43 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6546A21604 for ; Thu, 4 Jun 2015 14:50:38 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 04 Jun 2015 14:50:38 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=5p5foK6YTDml4fiImfltINGqubI=; b=FMikzw iSvZtcZD06ooiK7pv9fsHGpobXjBdedYgQ35U0rWoDnWGY8kvOqJU4yiYzTb0cQw ZslBHznB/9y5na15eJW067pu4iVi1ivfAHlXG53yP9qtXF+UTu8ERTwVrXtN+b9A E8SvpmSFj3LUdv0Gu8HIuFq2zPG5kAWknKsHs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=5p5foK6YTDml4fi ImfltINGqubI=; b=UqAfJ7acC0+btsdOBBv8FF9YM6osfd2pFzwLeZUCz7Fktsv kaSlpMS6BpLcm7S/IZkhiFyHvnuQlufnBg3kpq674YjueTi6doazYIUtMzt1/b2F lreT+4GZby1c6CcCHlbxM0Am9cZgo+4GMbKnILPuF21ZzMPzvprSE704qDRA= X-Sasl-enc: cYQafmaJSV6N8u4zN0QKsEKrWF9YBabzIIqSPA0KG+JL 1433443838 Received: from [192.168.1.2] (unknown [174.21.228.230]) by mail.messagingengine.com (Postfix) with ESMTPA id DC4EB6801CC; Thu, 4 Jun 2015 14:50:37 -0400 (EDT) Message-ID: <55709DFD.9050302@aklaver.com> Date: Thu, 04 Jun 2015 11:50:37 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: emilu@encs.concordia.ca, pgsql-sql@postgresql.org Subject: Re: remove tablespace for primary key (*not* by drop/recreate constraint) References: <55707FAA.8060204@encs.concordia.ca> <55709A8A.7010005@encs.concordia.ca> In-Reply-To: <55709A8A.7010005@encs.concordia.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 06/04/2015 11:35 AM, Emi Lu wrote: > Hello, >> >> to remove tablespace for primary key please? >> >> For example, z1 (c1 text) with pk_z1 PRIMARY KEY (c1), tablespace >> "abc" >> >> May I know how to remove tablespace(set tablespace to empty for z1)? >> >> >> ​ It doesn't make sense to "remove" a tablespace...the best you can do >> is change a table's (and its related indexes) tablespace >> ​ >> ​ from one to another. >> >> If "ALTER TABLE ... SET TABLESPACE ..." doesn't accomplish your goal >> you will need to explain yourself better. > > Want to SET tablespace = '' for primary key but not table. Tried alter > index ... set tablespace='', but empty does not work? set tablespace pg_default > > Thanks > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql