Received: from nezu.gs.verio.net (nezu.gs.verio.net [204.27.65.34]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5LEmba07213 for ; Thu, 21 Jun 2001 10:48:37 -0400 (EDT) (envelope-from jeckermann@verio.net) Received: by NEZU with Internet Mail Service (5.5.2650.21) id ; Thu, 21 Jun 2001 09:48:31 -0500 Message-ID: <08CD1781F85AD4118E0800A0C9B8580B094AEF@NEZU> From: Jeff Eckermann To: "'david.brown@mviva.net'" , pgsql-sql@postgresql.org Subject: RE: arguments for query files Date: Thu, 21 Jun 2001 09:48:30 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain X-Archive-Number: 200106/330 X-Sequence-Number: 3617 I don't think this is possible in the way that you specify. What works for me is to include psql variable names in the script file, then set the values before each run. psql variables are of the form " : ". To assign a value, just do " \set variable=value ". I like to include lines at the end of my script to unset these values, of the form " \unset variable ". HTH. > -----Original Message----- > From: david.brown@mviva.net [SMTP:david.brown@mviva.net] > Sent: Tuesday, June 19, 2001 12:06 PM > To: pgsql-sql@postgresql.org > Subject: arguments for query files > > Does anybody know how I can pass arguments into files which I execute > from within psql using \i? > > I want to be able to do something like: > \i file arg1 arg2 > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)