X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6966353734 for ; Sat, 23 Apr 2005 10:31:01 -0300 (ADT) 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 35958-02 for ; Sat, 23 Apr 2005 13:30:51 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id EE7465368D for ; Sat, 23 Apr 2005 10:30:49 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j3NDUgj9036696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Apr 2005 07:30:45 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j3NDUgaR025979; Sat, 23 Apr 2005 07:30:42 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j3NDUgZu025978; Sat, 23 Apr 2005 07:30:42 -0600 (MDT) (envelope-from mfuhr) Date: Sat, 23 Apr 2005 07:30:42 -0600 From: Michael Fuhr To: Geoffrey Cc: pgsql-sql@postgresql.org Subject: Re: [despammed] Insert psql commands inside a script Message-ID: <20050423133042.GA21979@winnie.fuhr.org> References: <2F1DE8CC97C00645B9FEA539982DA22401900D5A@USEA-EXCH4.na.uis.unisys.com> <20050423060538.GA19935@webserv.wug-glas.de> <426A3C74.8040309@3times25.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <426A3C74.8040309@3times25.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/357 X-Sequence-Number: 21250 On Sat, Apr 23, 2005 at 08:15:48AM -0400, Geoffrey wrote: > > Or you can do the following: > > psql database < sqlcode > > where sqlcode contains your sql. That command redirects the standard input from the file named sqlcode; the requirement says NOT to use an external file. -- Michael Fuhr http://www.fuhr.org/~mfuhr/