Re: SQL from Linux command line - Mailing list pgsql-novice

From Alan Hodgson
Subject Re: SQL from Linux command line
Date
Msg-id 201007120857.59795@hal.medialogik.com
Whole thread Raw
In response to Re: SQL from Linux command line  (Andreas Kretschmer <akretschmer@spamfence.net>)
List pgsql-novice
> Scott Geller <geller.subscribe@gmail.com> wrote:
> > Hello
> >
> > Hoping for some help on this one....
> >
> > I need to query postgres, run a count of specific records, and write to
> > a different table based on the results all from the linux command
> > line.
> >
> > My questions are:
> >  1. Would I use psql for this?
> >  2. If so, how do I structure the script to run psql from Linux?
> >  3. how do I pass the value for the where clause from the command line
> >  into the
> >
> >     code?

Using Perl would be a lot easier.

--
"No animals were harmed in the recording of this episode. We tried but that
damn monkey was just too fast."

pgsql-novice by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: function runs slow
Next
From: DMan65
Date:
Subject: Need help doing a CSV import