Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8C926632306 for ; Wed, 14 Jan 2009 06:44:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 01548-04 for ; Wed, 14 Jan 2009 06:44:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id C94296321D1 for ; Wed, 14 Jan 2009 06:44:43 -0400 (AST) Received: (qmail 2183 invoked by uid 0); 14 Jan 2009 10:44:40 -0000 Received: from 192.124.237.8 by www131.gmx.net with HTTP; Wed, 14 Jan 2009 11:44:40 +0100 (CET) Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset="iso-8859-1" Date: Wed, 14 Jan 2009 11:44:40 +0100 From: Jan-Peter.Seifert@gmx.de In-Reply-To: Message-ID: <20090114104440.310500@gmx.net> MIME-Version: 1.0 References: <20090112093427.316400@gmx.net> Subject: Re: PGOPTIONS and default_tablespace To: "Scott Marlowe" X-Authenticated: #955937 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1/gTf821wLg8QK9a0JO1dAf6eeE++jxpprTqoxMMc HkkS/G+hL9qsn+VC8GtDpqAGTuDalvsu16Zg== Content-Transfer-Encoding: 8bit X-GMX-UID: IfpbAAI+QEV/FRagZ3VpTeZCNzg2NUIN X-FuHaFi: 0.63 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/44 X-Sequence-Number: 31091 Hello Scott, > Date: Mon, 12 Jan 2009 13:09:19 -0700 > From: "Scott Marlowe" > > without success I tried to set the default tablespace via the > environment variable PGOPTIONS. > > > > My tries: > > set PGOPTIONS="default_tablespace='pgdata'" ... > I do this one of two ways usually. Either I set the user / database > to have a default tablespace permanently via alter user / database, or > I put it at the top of my script I'm running. PGOPTIONS isn't really > the place I think of setting it myself. The ALTER USER way works perfectly. Thanks a lot! There's just one detail I'm not happy with.: http://www.postgresql.org/docs/8.3/interactive/manage-ag-tablespaces.html "If a database is created without specifying a tablespace for it, it uses the same tablespace as the template database it is copied from." It would be really nice if the create db commands would follow the default_tablespace setting as well. Thank you very much, Peter Seifert -- Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a