On Mon, Jan 12, 2009 at 2:34 AM, <Jan-Peter.Seifert@gmx.de> wrote:
> Hello,
>
> without success I tried to set the default tablespace via the environment variable PGOPTIONS.
>
> My tries:
> set PGOPTIONS="default_tablespace='pgdata'"
> set PGOPTIONS=default_tablespace='pgdata'
> set PGOPTIONS=default_tablespace(pgdata)
> set PGOPTIONS=default_tablespace('pgdata')
>
> When I try to connect to the server via psql I get the error message: "FATAL: invalid command-line arguments for
serverprocess. HINT: Try "postgres --help" for more information."
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.