Re: Query from shell - Mailing list pgsql-sql

From kevin.kempter@dataintellect.com
Subject Re: Query from shell
Date
Msg-id 200604061543.16330.kevin.kempter@dataintellect.com
Whole thread Raw
In response to Re: Query from shell  ("Owen Jacobson" <ojacobson@osl.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Re: Query from shell
Next
From: "Jim Buttafuoco"
Date:
Subject: Re: Query from shell