pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: kevin.kempter@dataintellect.com
To: pgsql-sql@postgresql.org
Subject: Re: Query from shell
Date: Thu, 6 Apr 2006 15:43:16 -0600
Message-ID: <200604061543.16330.kevin.kempter@dataintellect.com> (raw)
In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC28843E@nelson.osl.com>
References: <144D12D7DD4EC04F99241498BB4EEDCC28843E@nelson.osl.com>

On Thursday 06 April 2006 15:37, Owen Jacobson wrote:
> Judith wrote:
> >        Hi every body, somebody can show me hot to execute a
> > query from a shell
>
> echo QUERY HERE | psql databasename
>
> Or, if you want to run several queries, run psql and run your queries
> there.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster


I think you can also run:
psql -f filename.sql database_name



view thread (6+ messages)  latest in thread

Message-ID: <200604061543.16330.kevin.kempter@dataintellect.com>
Permalink:  ../200604061543.16330.kevin.kempter@dataintellect.com/
Also on:    postgresql.org/message-id/200604061543.16330.kevin.kempter@dataintellect.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: kevin.kempter@dataintellect.com
  Subject: Re: Query from shell
  In-Reply-To: <200604061543.16330.kevin.kempter@dataintellect.com>

* 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