pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Raymond O'Donnell <rod@iol.ie>
To: Kapil Kr. Khandelwal <kapilk@cscape.in>
Cc: pgadmin-support@postgresql.org
Subject: Re: Fwd: How to run query by command prompt in Postgres
Date: Wed, 27 Jun 2012 12:51:22 +0100
Message-ID: <4FEAF3BA.40707@iol.ie> (raw)
In-Reply-To: <CAMDMQnAfAw4djXG5E5zoSbSfUq0yR8dCTsnb5uGKCU-ysWr-5w@mail.gmail.com>
References: <CAMDMQnCCQrVQG=0GW-qsq-Mk-vxa7quXbDZVSQ6_SntpersXFg@mail.gmail.com>
	<CAMDMQnAfAw4djXG5E5zoSbSfUq0yR8dCTsnb5uGKCU-ysWr-5w@mail.gmail.com>

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





view thread (21+ messages)  latest in thread

Message-ID: <4FEAF3BA.40707@iol.ie>
Permalink:  ../4FEAF3BA.40707@iol.ie/
Also on:    postgresql.org/message-id/4FEAF3BA.40707@iol.ie

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: rod@iol.ie, kapilk@cscape.in, pgadmin-support@postgresql.org
  Subject: Re: Fwd: How to run query by command prompt in Postgres
  In-Reply-To: <4FEAF3BA.40707@iol.ie>
  References: <CAMDMQnCCQrVQG=0GW-qsq-Mk-vxa7quXbDZVSQ6_SntpersXFg@mail.gmail.com> <CAMDMQnAfAw4djXG5E5zoSbSfUq0yR8dCTsnb5uGKCU-ysWr-5w@mail.gmail.com> <4FEAF3BA.40707@iol.ie>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox