Pass parameters to SQL script - Mailing list pgsql-general

From Fuchs Clemens
Subject Pass parameters to SQL script
Date
Msg-id 9DDD01E6B277D511B22300A0C9EEE776025D522B@LNZP106A
Whole thread Raw
Responses Re: Pass parameters to SQL script  (Daniel Martini <dmartini@uni-hohenheim.de>)
List pgsql-general

Hi,

is it possible to pass parameters to a SQL script, which I launch via the psql shell?

In Oracle it works like that:

        sqlplus myscript.sql myschema

and within the script I can use the parameter like this:
       
        CONCAT .
        CREATE TABLE &1..test (name VARCHAR2(100));

Is there a counterpart for PostgreSQL?

thanks,
Clemens

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: select count(*) from pg_stat_activity in V8.0.0
Next
From: Paramveer.Singh@trilogy.com
Date:
Subject: possible bug in exception handling code? (postgres8.0beta)