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

From Igor Korot
Subject Re: Way to retrieve UserName/Password
Date
Msg-id CA+FnnTyheuK0H0DfcH0pA2fAh44K+a6or4EnAvkYLiv917Z46A@mail.gmail.com
Whole thread Raw
In response to Re: Way to retrieve UserName/Password  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hi, David,

On Sat, Nov 22, 2025 at 9:37 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Saturday, November 22, 2025, Igor Korot <ikorot01@gmail.com> wrote:
>>
>>
>> WHat I'd like to do in my software is to get those parameters and use
>> them in the "Connect To DB" dialog.
>
>
> There is pretty much nothing special about this situation pertaining to PostgreSQL.  What specific challenge are you
encountering? I have to imagine nearly all languages have a module/library that handles this 30+ year old file format. 

The simplest solution would be to use SQLGetPrivateProfileString().

However, as much as I'd like to, this function distinguishes between
"UserId" and "UserID".

There is also a problem where the odbc.ini file location is different
from distro to distro, which the function above nicely handles, but
I'll need to roll my own some 3rd party library.

Thank you.

>
> David J.



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Way to retrieve UserName/Password
Next
From: Igor Korot
Date:
Subject: Re: Way to retrieve UserName/Password