pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Buttafuoco <jim@contactbda.com>
To: Owen Jacobson <ojacobson@osl.com>
To: pgsql-sql@postgresql.org
Subject: Re: Query from shell
Date: Thu, 6 Apr 2006 18:56:42 -0400
Message-ID: <20060406225547.M95598@contactbda.com> (raw)
In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC28843E@nelson.osl.com>
References: <144D12D7DD4EC04F99241498BB4EEDCC28843E@nelson.osl.com>

or

psql db <<EOQ
select...;
delete...;
update...;
\q
EOQ



---------- Original Message -----------
From: "Owen Jacobson" <ojacobson@osl.com>
To: <pgsql-sql@postgresql.org>
Sent: Thu, 6 Apr 2006 14:37:51 -0700
Subject: Re: [SQL] Query from shell

> 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
------- End of Original Message -------




view thread (6+ messages)

Message-ID: <20060406225547.M95598@contactbda.com>
Permalink:  ../20060406225547.M95598@contactbda.com/
Also on:    postgresql.org/message-id/20060406225547.M95598@contactbda.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: jim@contactbda.com, ojacobson@osl.com
  Subject: Re: Query from shell
  In-Reply-To: <20060406225547.M95598@contactbda.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