Setting global parameter in Postgres 8.3 - Mailing list pgsql-general

From
Subject Setting global parameter in Postgres 8.3
Date
Msg-id 4AD2336877609F41A2B0D53BAD09FC57C711A2@VOO-EXCHANGE07.internal.sungard.corp
Whole thread Raw
Responses Re: Setting global parameter in Postgres 8.3  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List 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

 

 

 

 

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: R: Re: R: Re: Weird EXECUTE ... USING behaviour
Next
From: "A. Kretschmer"
Date:
Subject: Re: Setting global parameter in Postgres 8.3