Running a query from the OS CLI - Mailing list pgsql-general

From Gauthier, Dave
Subject Running a query from the OS CLI
Date
Msg-id D7FF158337303A419CF4A183F48302D602F19224@hdsmsx411.amr.corp.intel.com
Whole thread Raw
Responses Re: Running a query from the OS CLI  ("Dann Corbit" <DCorbit@connx.com>)
Re: Running a query from the OS CLI  (Michael Glaesemann <grzm@seespotcode.net>)
Re: Running a query from the OS CLI  (Steve Atkins <steve@blighty.com>)
List pgsql-general

If I have a DB called “foo”

...and...

I want to run “select name from table_a where name like ‘john%’”

...and...

I want no table header “NAME” in the output

...and...

I want to do this as a one-liner from the linux command line

...and...

I don’t want to have to deal with intermediate files or home-grown programs...

 

Is this possible?

 

 

 

 

pgsql-general by date:

Previous
From: luca.ciciriello@email.it
Date:
Subject: Re: PostgreSQL and cluster
Next
From: Oleg Bartunov
Date:
Subject: Re: Dealing with tsvector in fuctions for data split