X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 81C423AB8A6 for ; Fri, 10 Dec 2004 22:24:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97202-03 for ; Fri, 10 Dec 2004 22:23:48 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id BFDB93B3214 for ; Fri, 10 Dec 2004 18:49:58 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr4.postgresql.org (Postfix) with ESMTP id E1BA65AF7E3 for ; Tue, 7 Dec 2004 17:02:12 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id iB7H1eCE030709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Dec 2004 10:01:43 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id iB7H1eLh062891; Tue, 7 Dec 2004 10:01:40 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id iB7H1ePU062890; Tue, 7 Dec 2004 10:01:40 -0700 (MST) (envelope-from mfuhr) Date: Tue, 7 Dec 2004 10:01:40 -0700 From: Michael Fuhr To: "Pradeepkumar, Pyatalo (IE10)" Cc: pgsql-admin@postgresql.org Subject: Re: Running sql files Message-ID: <20041207170140.GA62742@winnie.fuhr.org> References: <77ED2BF75D59D1439F90412CC5B1097415A1A07D@ie10-sahara.hiso.honeywell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097415A1A07D@ie10-sahara.hiso.honeywell.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/72 X-Sequence-Number: 15658 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/