Re: Setting global parameter in Postgres 8.3

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Setting global parameter in Postgres 8.3
Date: 2010-01-14 12:35:07
Message-ID: d3ab2ec81001140435i55b9c6a4nb46cbcb33d5e6bc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 14, 2010 at 11:10 AM, A. Kretschmer <
andreas(dot)kretschmer(at)schollglas(dot)com> wrote:

> In response to A(dot)Bhattacharya(at)sungard(dot)com :
> > CREATE TABLESPACE bank_master_tbsp OWNER bank LOCATION ?$drive/data/bank/
> > master_tbsp';
> >
> > CREATE TABLESPACE bank_static_tbsp OWNER bank LOCATION ?$drive
> /data/bank/
> > static_tbsp';
> >
> >
> >
> > I need to replace the $drive with a absoulte location in order to create
> the
> > tablespaces at run time.So is there any way I can pass parameter to sql
> file at
> > the time of execuitng it or is there any way I can set a global parameter
> which
>
>
> You can't do in it plain sql, but if your script is designed especially
for psql, then you could use a psql variable:

http://www.postgresql.org/docs/current/static/app-psql.html#APP-PSQL-VARIABLES

--Scott

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2010-01-14 13:31:07 Configuration Optimisation
Previous Message A. Kretschmer 2010-01-14 10:10:46 Re: Setting global parameter in Postgres 8.3