Re: [GENERAL] Running a query from the OS CLI

2007-08-08 Thread Gauthier, Dave
: pgsql-general@postgresql.org Subject: Re: [GENERAL] Running a query from the OS CLI On Aug 8, 2007, at 13:13 , Gauthier, Dave wrote: > If I have a DB called "foo" psql --dbname "foo" > > ...and... > > I want to run "select name from table_a where na

Re: [GENERAL] Running a query from the OS CLI

2007-08-08 Thread Steve Atkins
On Aug 8, 2007, at 11:13 AM, Gauthier, Dave wrote: 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...

Re: [GENERAL] Running a query from the OS CLI

2007-08-08 Thread Michael Glaesemann
On Aug 8, 2007, at 13:13 , Gauthier, Dave wrote: If I have a DB called "foo" psql --dbname "foo" ...and... I want to run "select name from table_a where name like 'john%'" psql --dbname "foo" -c "select name from table_a where name like 'john %'" ...and... I want no table header "

Re: [GENERAL] Running a query from the OS CLI

2007-08-08 Thread Dann Corbit
See: http://www.postgresql.org/docs/8.2/interactive/app-psql.html From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gauthier, Dave Sent: Wednesday, August 08, 2007 11:14 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Running a query from

[GENERAL] Running a query from the OS CLI

2007-08-08 Thread Gauthier, Dave
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