pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Pradeepkumar, Pyatalo (IE10) <Pradeepkumar.Pyatalo@honeywell.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Running sql files
Date: Tue, 7 Dec 2004 10:01:40 -0700
Message-ID: <20041207170140.GA62742@winnie.fuhr.org> (raw)
In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097415A1A07D@ie10-sahara.hiso.honeywell.com>
References: <77ED2BF75D59D1439F90412CC5B1097415A1A07D@ie10-sahara.hiso.honeywell.com>

On Tue, Dec 07, 2004 at 04:55:24AM -0700, Pradeepkumar, Pyatalo (IE10) wrote:

> $psql dbname < sqlfile
> The results of  the command are displayed on to the screen. In one file I am
> trying to populate a table with values ( There are more than 5000 tuples to
> be inserted).
> When I run this command, it displays the results on to the screen which I
> don't want to do.

As someone else suggested, you could redirect the script's output
to /dev/null.  You could also use psql's -q ("quiet") option or
surround certain parts of the file with "\set QUIET" and "\unset
QUIET".

COPY is quieter and more efficient than INSERT, so if you're using
INSERT then you could replace it with the appropriate COPY statement.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (7+ messages)  latest in thread

Message-ID: <20041207170140.GA62742@winnie.fuhr.org>
Permalink:  ../20041207170140.GA62742@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20041207170140.GA62742@winnie.fuhr.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, Pradeepkumar.Pyatalo@honeywell.com
  Subject: Re: Running sql files
  In-Reply-To: <20041207170140.GA62742@winnie.fuhr.org>
  References: <77ED2BF75D59D1439F90412CC5B1097415A1A07D@ie10-sahara.hiso.honeywell.com> <20041207170140.GA62742@winnie.fuhr.org>

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

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