Way to retrieve UserName/Password - Mailing list pgsql-general

From Igor Korot
Subject Way to retrieve UserName/Password
Date
Msg-id CA+FnnTxAbVGgKkWGwowXqfK=1Gkz1=RJdJMG-Pvy168=iaK-aw@mail.gmail.com
Whole thread Raw
Responses Re: Way to retrieve UserName/Password
Re: Way to retrieve UserName/Password
List pgsql-general
Hi, ALL,
I successfully built the server and I previously had the odbc driver installed.

I can successfully connect from psql from the Terminal, and from isql
unixODBC utility.

However, what I wonder is - is there a simple way to retrieve UsrerName
and Password from odbc.ini file?

Below is my current configuration to connect.

WHat I'd like to do in my software is to get those parameters and use
them in the "Connect To DB" dialog.

The easiest would probably be to save it in my local program configuration file,
but in this case the information will be duplicated and I'd like to avoid it.

Thank you.


[code]
igor@WaylandGnome ~/dbhandler/Debug $ cat /etc/unixODBC/odbcinst.ini
[ODBC]
Trace=Yes
TraceFile=/var/log/unixodbc.log

[postgres]
Description=Postgres ODBC Driver
Driver=/usr/lib64/psqlodbcw.so
FileUsage=1

igor@WaylandGnome ~/dbhandler/Debug $ cat /etc/unixODBC/odbc.ini
[postgres]
Driver=Postgres
Description=Postgres ODBC Driver
UserId=postgres
Password=wasqra
Servername=localhost
Database=draft
Port=5432

[ODBC]
Trace = Yes
TraceFile = /home/igor/odbc.log

[ODBC Data Sources]
postgres=PostgreSQL Driver testing

igor@WaylandGnome ~/dbhandler/Debug $
[/code]



pgsql-general by date:

Previous
From: Bernice Southey
Date:
Subject: Re: FK from logged to unlogged table?
Next
From: Ron Johnson
Date:
Subject: Re: Way to retrieve UserName/Password