Pass parameters to SQL script

From: Fuchs Clemens <clemens(dot)fuchs(at)siemens(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Pass parameters to SQL script
Date: 2004-08-19 08:59:20
Message-ID: 9DDD01E6B277D511B22300A0C9EEE776025D522B@LNZP106A
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paramveer.Singh 2004-08-19 09:26:25 possible bug in exception handling code? (postgres8.0beta)
Previous Message Robert Ngo 2004-08-19 08:47:55 need help with copy function