From: | Łukasz Jarych <jaryszek(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Using DSN Connection and knowing windows username |
Date: | 2018-06-21 04:15:46 |
Message-ID: | CAGv31oceO2EdXnicEHChAPxP57qB16keG4wVFyFCR-mQ0SopLw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you Adrian,
In the meantime just an idea, but could you capture the system user in a
> table in Access and use that to pass on to Postgres?
Brilliant ! simple and genious!
The purpose of it is to have history log table with DML and DDL changes
using triggers.
Best,
Luke
2018-06-21 0:11 GMT+02:00 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>:
> On 06/20/2018 07:06 AM, Łukasz Jarych wrote:
>
>> David G,
>>
>> thank you.
>> Can you confirm if i am thinking correctly ?
>>
>> So I can set up authetification to know which user is logged on and use
>> this as postgresql user?
>>
>
> Only if the system user is a postgres user or can be mapped to one:
>
> https://www.postgresql.org/docs/10/static/auth-username-maps.html
>
>
>> But i think it will be not possible to use DSN connection with this.
>>
>
> If you are talking about the ODBC DSN you use to create the linked table
> in Access then you are correct you are limited to whatever user is
> specified in the ODBC Manager.
>
> It would help to know what you plan to use the user name for?
>
> In the meantime just an idea, but could you capture the system user in a
> table in Access and use that to pass on to Postgres?
>
>
>
>> Best ,
>> Luke
>>
>> 2018-06-20 15:34 GMT+02:00 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com
>> <mailto:david(dot)g(dot)johnston(at)gmail(dot)com>>:
>>
>> On Wednesday, June 20, 2018, Łukasz Jarych <jaryszek(at)gmail(dot)com
>> <mailto:jaryszek(at)gmail(dot)com>> wrote:
>>
>> How to know in postgresql which specific windows user is using
>> database?
>>
>> You cannot. All the server knows is the specific user credentials
>> it is authenticating.
>>
>> That said you can authenticate those credentials in such a way so
>> that knowing the signed on user you would also know who they are in
>> any environment that uses the same authentication source - and if
>> that source supplies their Windows identity you are golden. The
>> specific setups involved here are outside my experience, though.
>>
>> David J.
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-06-21 05:27:25 | Re: using pg_basebackup for point in time recovery |
Previous Message | David G. Johnston | 2018-06-20 22:46:55 | Re: SQL Query never ending... |