agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: kang@risca.rs.msu.edu
To: postgres@postgres.Berkeley.EDU
Subject: Does psql -f filename work?
Date: Mon, 11 Sep 1995 11:49:16 -0400
Message-ID: <9509111549.AA15290@risca.rs.msu.edu> (raw)



Hi,
I am running pg95 Beta 0.03 from Linux 1.2.11 without ELF.  There is an option
"-f filename	use file as a source of queries" when initiating psql command.

I tried the followings:
psql -d mydb -f my_source_file
psql -f my_source_file -d mydb

It always give me the following error message:
Connecting to database 'my_source_file' failed.
FATAL 1" database my_source_file does not exist, bailing out ...

It seems that the entry after -f has become the db name in psql.
Can the -f co-exist with -d?

I have to use a shell script like this:
psql -d mydb <<!
\i my_source_file
\q
!

Kang,


==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: kang@risca.rs.msu.edu
  Subject: Re: Does psql -f filename work?
  In-Reply-To: <9509111549.AA15290@risca.rs.msu.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox