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