Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E0395126090C for ; Wed, 27 Jun 2012 09:11:26 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sjr5V-0007RM-2y for pgadmin-support@postgresql.org; Wed, 27 Jun 2012 12:11:26 +0000 Received: by pbbrp8 with SMTP id rp8so1471943pbb.19 for ; Wed, 27 Jun 2012 05:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:in-reply-to:mime-version:date:message-id:subject:to :cc:content-type; bh=H8F/1uw7ENOkT+UQwS45qYLHyD91LfC4mT5F4/Qd5UA=; b=0g6fTD6AOCW81IJstheaBZJWN2NGy0t20buVuO5Z5i9QRYu819ItPdEDdmzvJsSQdM drb3X9v6NUWHAaPiMXUn+/sf45PvCVWhICnWPVKZjoISLM2C+zgcfyWcbXqgQk3iEJ9H YqoDtrAOdDgZegF7OAOiFeEbpap9MPkLnciazUOk+J9AW/D2K4EsbGFSheFlZ5I4N1nm z/kcmV300h83fA+pBaS0zqqnASx3egMGyLY9nhPaGEw97HbEeH+BA+TY/6YMSZ9GB6wV 1S6iHBvdEqdhnHfxM28W7tZzxu4aDvnl8tjrR9N5qk7VFmys08ZjOZk4Eyq0RdVSndsy wVGA== Received: by 10.68.194.201 with SMTP id hy9mr63150214pbc.69.1340799060094; Wed, 27 Jun 2012 05:11:00 -0700 (PDT) References: <4FEAF3BA.40707@iol.ie> From: Julien Rouhaud In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8A306) Date: Wed, 27 Jun 2012 14:11:19 +0200 Message-ID: <608028210012020063@unknownmsgid> Subject: Re: Fwd: How to run query by command prompt in Postgres To: "Kapil Kr. Khandelwal" Cc: "rod@iol.ie" , "pgadmin-support@postgresql.org" Content-Type: multipart/alternative; boundary=047d7b10cb0fb12f5d04c3731bf8 X-Pg-Spam-Score: -0.4 (/) X-Archive-Number: 201206/56 X-Sequence-Number: 12750 --047d7b10cb0fb12f5d04c3731bf8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 27 juin 2012 =E0 14:06, "Kapil Kr. Khandelwal" a =E9c= rit : Dear Sir I want to run sql query, without any file. I have connected the db, but not getting success run sql query. Did you end your input with a ; Without it, pressing return will just add another line to your query I can run by file, if you can provide me steps of this. Looking forward to positive response from your side. Thanks in advance. Thanks & Regards Kapil Kr. Khandelwal M: 09694179109 CodeScape Consultants, Jaipur On Wed, Jun 27, 2012 at 5:21 PM, Raymond O'Donnell wrote: > 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 > > > --047d7b10cb0fb12f5d04c3731bf8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


Le 27 juin 2012 =E0 14:06, &qu= ot;Kapil Kr. Khandelwal" <kapil= k@cscape.in> a =E9crit=A0:

Dear Sir

I want to run sql query, without any file.= I have connected the db, but not getting success run sql query.=A0

Did you end your input with a ;
Without= it, pressing return will just add another line to your query

I can run by file, if yo= u can provide me steps of this.=A0

Looking forward to positive response from your side. Th= anks in advance.=A0


Thanks & Rega= rds

Kapil Kr. Khandelwal
M= : 09694179109
C= odeScape Consultants,=A0Jaipur



On Wed, Jun 27, 2012 at 5:21 PM, Raymond= O'Donnell <rod@iol.ie> wro= te:
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 quer= y
> 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<= /a>



--047d7b10cb0fb12f5d04c3731bf8--