Skip site navigation (1) Skip section navigation (2)

Re: Unix Scripts linking with Postgres

From: Rasputin <rasputin(at)FreeBSD-uk(dot)eu(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Unix Scripts linking with Postgres
Date: 2001-01-16 15:29:12
Message-ID: 20010116152912.A45423@dogma.freebsd-uk.eu.org (view raw or flat)
Thread:
Lists: pgsql-novice
* Luke Tudor - RSG <ltt(at)pml(dot)ac(dot)uk> [010116 14:50]:
> Dear All,
> 
> I have set-up my postgres db to require user authentication when a user
> wishes to enter the db.
> This works wonderfully.
>  
> I have programs written in Java, Ansi C and CGI which integrate with the
> database and pass user names and
> passwords to the database using the pgConnect function. However, I also
> have several unix scripts which must
> be able to gain access into the database in a similar manner i.e. make a
> connection with no user interaction. 
> 
> Is there anyway I can do this within a Unix Script?

I assume you mean from a shell script (i.e bash or similar). 

What flavour CGI do you write? I've got perl scripts connecting
fine from the command line; there's nothing special about
CGI environments in that respect.

Of course from a user point of view, any account that can read the script
can suss out the password, which may not be what you want.

-- 
Rasputin 
Jack of All Trades :: Master of Nuns

In response to

pgsql-novice by date

Next:From: Ken CoreyDate: 2001-01-16 15:44:39
Subject: Re: Yikes! Bitten by line length?
Previous:From: Orlando Eloy GentilDate: 2001-01-16 15:28:15
Subject: Re: Unix Scripts linking with Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group