Обсуждение: Npgsql and the Connection Service File

Поиск
Список
Период
Сортировка

Npgsql and the Connection Service File

От
Niels Jespersen
Дата:

Hello all

 

Is there a way to get Npgsql understand the Connection Service File (https://www.postgresql.org/docs/13/libpq-pgservice.html). ?

 

The purpose is to abstract physical details such as hostname, portnumber away from the application.

 

Regards Niels Jespersen

Re: Npgsql and the Connection Service File

От
Laurenz Albe
Дата:
On Fri, 2021-01-29 at 14:13 +0000, Niels Jespersen wrote:
> Is there a way to get Npgsql understand the Connection Service File
(https://www.postgresql.org/docs/13/libpq-pgservice.html).?
 
> 
> The purpose is to abstract physical details such as hostname, portnumber away from the application.

No, the service file is part of libpq, and Npgsql doesn't use that.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




SV: Npgsql and the Connection Service File

От
Niels Jespersen
Дата:
>
>
>-----Oprindelig meddelelse-----
>Fra: Laurenz Albe <laurenz.albe@cybertec.at> 
>Sendt: 29. januar 2021 20:14
>Til: Niels Jespersen <NJN@dst.dk>; pgsql-general@lists.postgresql.org
>Emne: Re: Npgsql and the Connection Service File
>
>On Fri, 2021-01-29 at 14:13 +0000, Niels Jespersen wrote:
>> Is there a way to get Npgsql understand the Connection Service File
(https://www.postgresql.org/docs/13/libpq-pgservice.html).?
 
>> 
>> The purpose is to abstract physical details such as hostname, portnumber away from the application.
>
>No, the service file is part of libpq, and Npgsql doesn't use that.
>
Yes. Thank you for clarifying. 

It would be nice if Npgsql (and jdbc and others) emulated the libpq behaviour. Because in my mind, abstracting
hostname,portnumber and databasename  away is a really useful feature. 
 

How do others manage this? 

Regards Niels Jespersen

>Yours,
>Laurenz Albe
>-- 
>Cybertec | https://www.cybertec-postgresql.com
>

Re: SV: Npgsql and the Connection Service File

От
Laurenz Albe
Дата:
On Sat, 2021-01-30 at 15:56 +0000, Niels Jespersen wrote:
> It would be nice if Npgsql (and jdbc and others) emulated the libpq behaviour.
>  Because in my mind, abstracting hostname, portnumber and databasename 
>  away is a really useful feature. 
> 
> How do others manage this?

Either they don't or they write their own class that does that.

Perhaps you should contact Npgsql and suggest such a feature.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




SV: SV: Npgsql and the Connection Service File

От
Niels Jespersen
Дата:
>On Sat, 2021-01-30 at 15:56 +0000, Niels Jespersen wrote:
>> It would be nice if Npgsql (and jdbc and others) emulated the libpq behaviour.
>>  Because in my mind, abstracting hostname, portnumber and databasename  
>> away is a really useful feature.
>> 
>> How do others manage this?
>
>Either they don't or they write their own class that does that.
>
>Perhaps you should contact Npgsql and suggest such a feature.
>
Yes, thank you. 
I did just that. It turns out there is already an existing pull request with exactly that feature. I hope for it to be
includedin a release soon. 
 
Regards Niels Jespersen

>Yours,
>Laurenz Albe
>--
>Cybertec | https://www.cybertec-postgresql.com
>


Re: SV: Npgsql and the Connection Service File

От
Dave Cramer
Дата:



On Mon, 1 Feb 2021 at 04:51, Niels Jespersen <NJN@dst.dk> wrote:
>On Sat, 2021-01-30 at 15:56 +0000, Niels Jespersen wrote:
>> It would be nice if Npgsql (and jdbc and others) emulated the libpq behaviour.
>>  Because in my mind, abstracting hostname, portnumber and databasename 
>> away is a really useful feature.
>>
>> How do others manage this?
>
>Either they don't or they write their own class that does that.
>
>Perhaps you should contact Npgsql and suggest such a feature.
>
Yes, thank you.
I did just that. It turns out there is already an existing pull request with exactly that feature. I hope for it to be included in a release soon.
Regards Niels Jespersen


Ya, I intend to push one in sooner than later.

Dave
 
>Yours,
>Laurenz Albe
>--
>Cybertec | https://www.cybertec-postgresql.com
>

SV: SV: Npgsql and the Connection Service File

От
Niels Jespersen
Дата:

Fra: Dave Cramer <davecramer@postgres.rocks>

 

>>> It would be nice if Npgsql (and jdbc and others) emulated the libpq behaviour.

>>>  Because in my mind, abstracting hostname, portnumber and databasename 

>>> away is a really useful feature.

>>>

>>> How do others manage this?

>> 

>>Either they don't or they write their own class that does that.

>> 

>>Perhaps you should contact Npgsql and suggest such a feature.

>> 

>Yes, thank you.

>I did just that. It turns out there is already an existing pull request with exactly that feature. I hope for it to be included in a release soon.

>Regards Niels Jespersen

>Ya, I intend to push one in sooner than later.

>Dave

 

Thank you for that. Looking very much forward to it.

 

Niels

   >