Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B32C3475BA0 for ; Thu, 24 Oct 2002 04:53:05 -0400 (EDT) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 39429475D3F for ; Thu, 24 Oct 2002 04:53:02 -0400 (EDT) Received: from klaster.net (pk49.krakow.cvx.ppp.tpnet.pl [217.99.211.49]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id E38382B4D6; Thu, 24 Oct 2002 10:46:19 +0200 (CEST) Message-ID: <3DB7B65E.801@klaster.net> Date: Thu, 24 Oct 2002 10:59:10 +0200 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: andres javier garcia garcia Cc: PostgreSQL List Subject: Re: Basic question. References: <200210240812.g9O8Cdc12687@natura.cebas.csic.es> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/325 X-Sequence-Number: 10042 Uz.ytkownik andres javier garcia garcia napisa?: > Hi; > I'm sorry for ask this basic question. But I can't find in the documentation. > > I'm connected to a database; and how can I execute a query that I've got in a > file? > > And. If I'm not connected to any database. Can I execute a file that makes a > query on a database? But how are you connected to database? If you are using tool named "psql" you can use "\i filename" or you can do from command line psql -U Tomasz Myrta