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 421A9536AC for ; Sat, 23 Apr 2005 10:46:27 -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 39484-07 for ; Sat, 23 Apr 2005 13:46:18 +0000 (GMT) Received: from 3times25.net (duck.3times25.net [66.23.211.34]) by svr1.postgresql.org (Postfix) with ESMTP id 6A76953622 for ; Sat, 23 Apr 2005 10:46:17 -0300 (ADT) Received: from [127.0.0.1] (rhws.home.edu [127.0.0.1]) by 3times25.net (Postfix) with ESMTP id E066E743DB for ; Sat, 23 Apr 2005 09:46:20 -0400 (EDT) Message-ID: <426A51AC.4070505@3times25.net> Date: Sat, 23 Apr 2005 09:46:20 -0400 From: Geoffrey User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050322 Red Hat/1.7.6-1.4.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: [despammed] Insert psql commands inside a script References: <2F1DE8CC97C00645B9FEA539982DA22401900D5A@USEA-EXCH4.na.uis.unisys.com> <20050423060538.GA19935@webserv.wug-glas.de> <426A3C74.8040309@3times25.net> <20050423133042.GA21979@winnie.fuhr.org> In-Reply-To: <20050423133042.GA21979@winnie.fuhr.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.015 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/358 X-Sequence-Number: 21251 Michael Fuhr wrote: > 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. My bad, I misread the post as indicating he wanted to use an external file. Too early on a Saturday with a late Friday and not enough coffee yet... -- Until later, Geoffrey