Re: Examples of accessing postgresql with scripts? - Mailing list pgsql-novice

From Rory Campbell-Lange
Subject Re: Examples of accessing postgresql with scripts?
Date
Msg-id 20030527164724.GB2445@campbell-lange.net
Whole thread Raw
In response to Re: Examples of accessing postgresql with scripts?  (hodges@xprt.net)
Responses Re: Examples of accessing postgresql with scripts?
List pgsql-novice
psql -d <dbname> [-U <user>] -c "<command>"

eg (if you do not need to log in as a user):
psql -d temporary -c "select * from people;"

On 27/05/03, hodges@xprt.net (hodges@xprt.net) wrote:
> Can anyone direct me to some example bash scripts that
> execute queries thru psql?
>
> I need to check a bunch of tables for dates as a background
> job daily.  Seems like bash, perl, or python might be good
> ways to do this.  I think I know enough perl to do it but
> maybe bash or python would be better choices?

--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

pgsql-novice by date:

Previous
From: Rory Campbell-Lange
Date:
Subject: Re: reuse RECORD in function 'select into'?
Next
From: Nabil Sayegh
Date:
Subject: Re: Examples of accessing postgresql with scripts?