Re: chron scripts and pgsql

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Ken Harris <kharris(at)lhinfo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: chron scripts and pgsql
Date: 2003-04-07 15:18:12
Message-ID: 3E9196B4.9030808@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Isn't the script execution id dynamic, i.e. changes everytime the script is run?
How do you also limit permissions to an execution id?

Ken Harris wrote:
> My instance of postgres runs on a separate box than the one that does the work.
> So connections are always via TCP/IP. Therefore, the simple "psql -c
> <command>" doesn't work because my databases require a username/password. My
> solution for the cron scripts (the only one I could figure out that works). My
> database name and password are stored in a file readable only by the script
> execution id. Those filenames and passwords are parsed and set to the PGUSER
> and PGPASSWORD variables (which exist only for the life of the script). I can
> then run my "pgsql -h <hostname> -c <command>" for any and all databases.
>
> If anyone has a better solution for the username/password, I would love to see
> it, but this works.
>
> Hope this helps,
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dan Langille 2003-04-07 15:23:57 Re: possible time change issue - known problem?
Previous Message Michal Taborsky 2003-04-07 15:16:25 CREATE USER within function