Skip site navigation (1) Skip section navigation (2)

Re: PGOPTIONS and default_tablespace

From: Jan-Peter(dot)Seifert(at)gmx(dot)de
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PGOPTIONS and default_tablespace
Date: 2009-01-14 10:44:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hello Scott,

> Date: Mon, 12 Jan 2009 13:09:19 -0700
> From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>

> > 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.:

"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.!*

In response to

pgsql-admin by date

Next:From: Emanuel Calvo FrancoDate: 2009-01-14 12:04:20
Subject: Re: [ADMIN] Problem with pg_dump
Previous:From: Tom LaneDate: 2009-01-14 00:47:14
Subject: Re: initdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group