Search Postgresql Archives

Re: Automating logins for mundane chores

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/08/07, Magnus Hagander <magnus@xxxxxxxxxxxx> wrote:
> Phoenix Kiula wrote:
> > I am writing some simple batch scripts to login to the DB and do a
> > pg_dump. Also, when I login to do my own SQL tinkering, I'd like not
> > to be asked for a password every time (which, for silly corporate
> > reasons, is quite a convoluted one).
> >
>
> It's in the environment on the client machine. If it's for your scripts,
> you can set it inside the script before you launch psql for example. If
> you need it.


Let's say my script was in Perl or PHP. What would the variable name
be to set this password? My script is unlikely to call psql, I'm
thinking of using only pg_dump and pg_restore.


> > 1. Where do I set up the automated password for (a) psql stuff and (b)
> > for bash scripts or cron jobs -- I suppose both could have the same
> > solution.
>
> a) In the home directory of the user running psql.
> b) In the home directory of the user running the cronjob.


Thanks for this. I am logged in as root. Put it there and it works. I
also put a ".psqlrc" in the home directory and that works too! Thanks!

I'd love to contribute back to the community and mention this in the
manual for 8.2/interactive. But the community login and commenting on
the site seems to be broken! Even after I am logged in, it does not
show it on each page of the site, and when I submit my comment (and
login all over again for it) it shows me a "numeric error". Where
should I post that error?

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux