> From: Michael Fuhr <[EMAIL PROTECTED]> > Date: Mon, 29 Dec 2003 14:06:13 -0700 > To: Charles Haron <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [ADMIN] How to use psql -c? > > On Mon, Dec 29, 2003 at 01:49:00PM -0700, Charles Haron wrote: >> >> Can someone give me an example of how to use the -c option of psql? I can't >> seem to get it to work. > > What are you doing and what are the results? We can't tell you what's > wrong unless you show us what you're doing and what's happening. > Learning why something doesn't work can be just as useful as learning > how to make it work. >
My first problem was that I was using single quotes instead of double quotes. But now I have another problem. The following command works as I want: psql -c "DELETE FROM prg_dates_members WHERE confirm = 'f';" comfire I want to be able to run the above command as a cron job. I created a script with the following command, but I get "ERROR: Attribute 'f' not found": su - postgres -c 'psql -c "DELETE FROM prg_dates_members WHERE confirm = 'f';" comfire' What am I doing wrong? Is there a better way to do this? Thanks, Chuck > -- > Michael Fuhr > http://www.fuhr.org/~mfuhr/ > ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match