Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C47E8126090C for ; Wed, 27 Jun 2012 08:51:44 -0300 (ADT) Received: from mail2.hosting.digiweb.ie ([89.234.64.43]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SjqmZ-0003vu-UM for pgadmin-support@postgresql.org; Wed, 27 Jun 2012 11:51:43 +0000 Received: (qmail 28855 invoked by uid 399); 27 Jun 2012 11:51:26 -0000 Received: from unknown (HELO ?127.0.0.1?) (music@galwaycathedral.ie@86.43.79.16) by mail2.hosting.digiweb.ie with ESMTPAM; 27 Jun 2012 11:51:26 -0000 X-Originating-IP: 86.43.79.16 Message-ID: <4FEAF3BA.40707@iol.ie> Date: Wed, 27 Jun 2012 12:51:22 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: "Kapil Kr. Khandelwal" CC: pgadmin-support@postgresql.org Subject: Re: Fwd: How to run query by command prompt in Postgres References: In-Reply-To: X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 120627-0, 27/06/2012), Outbound message X-Antivirus-Status: Clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/54 X-Sequence-Number: 12748 On 27/06/2012 12:18, Kapil Kr. Khandelwal wrote: > > > Dear Team > > I want to a favour from your side. I want to know, how to run sql query > by command prompt in postgres sql. psql -f file-with-query.sql your-database http://www.postgresql.org/docs/9.1/static/app-psql.html Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie