Setting global parameter in Postgres 8.3

From: <A(dot)Bhattacharya(at)sungard(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Setting global parameter in Postgres 8.3
Date: 2010-01-14 09:41:05
Message-ID: 4AD2336877609F41A2B0D53BAD09FC57C711A2@VOO-EXCHANGE07.internal.sungard.corp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

Is there any way we can set the global parameter in Postgres 8.3?

As I have a sql script which need to accept some parameter at run time.
For example I have sql script for creating tablespaces called
"create_tablespace.sql"

Inside the sql script I have the following statements

CREATE TABLESPACE bank_index_tbsp OWNER bank LOCATION
'$drive/data/bank/index_tbsp';

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 will repalce the $drive similar to the way
postregs converts or maps the $libdir parameter to the absolute path of
the "Lib" location of postgres.

Any help and suggestion will be really helpful.

Many thanks in advance

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2010-01-14 10:10:46 Re: Setting global parameter in Postgres 8.3
Previous Message Pavel Stehule 2010-01-14 08:55:58 Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour