see if this looks right to you (to be put in a cron. . .)
su pgsqluser -c "psql database -c 'select fields from tables where conditions;'
>outputfilename"
:-) or :-( ??
thanks! jt
-----Original Message-----
From: Bruce Momjian [SMTP:[EMAIL PROTECTED]]
Sent: Monday, September 27, 1999 11:50 AM
To: JT Kirkpatrick
Cc: '[EMAIL PROTECTED]'
Subject: Re: [ADMIN] command prompt select statement
Sure, psql has options for input query and output:
psql database <inquery >output.
> hello oh-more-knowledgable-than-me postgres folks!
>
> i'd like to run a select statement tonight after everyone is gone, and i
> don't feel like coming back in to do it (last person gone at 11pm). i need
> the output saved to a file, if possible. how can i do it from the bash
> prompt?? (linux rh 5.2, pg 6.4.2)
>
> jt kirkpatrick / mps
>
> ************
>
>
--
Bruce Momjian | http://www.op.net/~candle
[EMAIL PROTECTED] | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
************