X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7786ED902F for ; Thu, 22 Sep 2005 10:56:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77910-01 for ; Thu, 22 Sep 2005 13:55:58 +0000 (GMT) Received: from mailout08.sul.t-online.com (mailout08.sul.t-online.com [194.25.134.20]) by svr1.postgresql.org (Postfix) with ESMTP id 158A9DA769 for ; Thu, 22 Sep 2005 10:56:00 -0300 (ADT) Received: from fwd29.aul.t-online.de by mailout08.sul.t-online.com with smtp id 1EIRYQ-0002sf-06; Thu, 22 Sep 2005 15:56:02 +0200 Received: from localhost (ECpaN2ZcYepFOQ+1TSdnvhhKB1zg1IGHVDJV-2ltNF5WRxrbPiM4os@[172.20.101.250]) by fwd29.aul.t-online.de with esmtp id 1EIRYH-16Qhai0; Thu, 22 Sep 2005 15:55:53 +0200 MIME-Version: 1.0 Date: Thu, 22 Sep 2005 15:55:53 +0200 To: pgsql-sql@postgresql.org X-UMS: email X-Mailer: TOI Kommunikationscenter V6-0PL1 Subject: postgres on the comman line From: =?ISO-8859-1?Q?=22Michael_H=F6ller=22?= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <1EIRYH-16Qhai0@fwd29.aul.t-online.de> X-ID: ECpaN2ZcYepFOQ+1TSdnvhhKB1zg1IGHVDJV-2ltNF5WRxrbPiM4os@t-dialin.net X-TOI-MSGID: e2fbb06a-068e-43fd-8c33-57874309f366 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/202 X-Sequence-Number: 22749 Hello, I like to automate a daily check and like to run select statement via cron but this seems to be more tricky than I thought.... I tried the following: su postgres -c "select count(*) from TABLE where xxxxxx;" I have the probelm that I am allways asked for the password - I did not find a way how to pass the password. Also I like to direct the result to a file, I assume I can do this via > but not haveing passed the first problem I did not check this. I am happy for every hint Thanks a lot Michael