[GRASS5] To: Postgresql interface programmers...
sixote alin
sixote at yahoo.com
Thu Sep 14 20:20:01 EDT 2000
Hi, Eric, hi, all,
--- "Eric G . Miller" <egm2 at jps.net> wrote:
> Hi all,
>
> I've been looking at some of the PostgreSQL
> interface code and I have a
> couple comments/suggestion/questions. First, there
> is no way to ever
> specify a password. If I wanted to connect to a
> remote machine, I'd
> have to resort to the unsecure 'export
> PGPASSWORD=fiddlesticks' (or
> whatever the variable's called). I realize a
> password can't be securely
> stored in ~/.grass5rc, but perhaps a flag could?
The postgres ident authentication, or the "password
passwd"? I tested both schemes, but the former was
found to be no good for the purpose. so do we send
password in clear?
> Also, the code always
> assumes the postgres username matches the system
> user name. This
> doesn't have to be the case (though it often is).
yes, i tink this has to be done.
> Also somewhat problematic is, g.select.pg set host
> to 'localhost' if no
> host is specified. This causes libpq to use TCP
> sockets rather than
> UNIX sockets. It may be on a system, you don't want
> the TCP sockets
> open for postgres (or at least not without a
> user/passwd authentication
> since ident sucks). I would ask that people let
> "PGHOST" be NULL. Or if
> you use PQconnectdb(), it can be a zero length
> string. Also, I noticed
> several instances where code looked like:
>
> if((pghost = G_getenv("PGHOST")) == NULL) pghost =
> NULL;
>
> Unless I'm mistaken, that will *always* fail if
> PGHOST is unset. My
> reading is you need to use 'G__getenv()'. The
> second assignment is, of
> course, redundant.
I remember hitting into this. The way you propose
works well. Shall this be changed in all modules, so
good.
>
> Anyway, I hope I don't sound like I'm lecturing
> (it's late, I'm tired,
> some other lame excuse...). I'd be happy to rewrite
> module interfaces,
> but I suspect some authors wouldn't like that.
hope i'm beyond the suspected. would be nice to have
people work together.
best regards,
alex
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list