Re: chron scripts and pgsql
От | Dennis Gearon |
---|---|
Тема | Re: chron scripts and pgsql |
Дата | |
Msg-id | 3E9196B4.9030808@cvc.net обсуждение исходный текст |
Ответ на | Re: chron scripts and pgsql (Ken Harris <kharris@lhinfo.com>) |
Список | 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, >
В списке pgsql-general по дате отправления: