question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

service= connection parameter

See original GitHub issue

The native libpq provides a nice way of central maintenance of connections across applications for example in ~/.pg_service.conf file by using service= connection parameter. Naturally when I tried to use postgresql://?service=something connection url it didn’t work. As I believe (after looking into connection-parameters.js) many other parameters are also ignored.

I am sorry for not providing a patch, but this is because it’s a design decision that you need to make, not just changing code. I’d think that the best one can do here is to pass the connection string to the native libpq unchanged somehow, but that may interfere with your idea of making native/js absolutely interchangeable (I think you’ll agree though that it should drive the js implementation, not hinder native libpq capabilities).

Meanwhile I have patched my copy to handle service parameter — that also takes ignoring ‘host’ if it’s not set. And deleting stuff from defaults on application startup, because it breaks things. I can, of course, give you my patch, but I do not think it’s anywhere near being a good solution, though once you make up your mind about which way to go I’d be glad to help you (especially if I agree with your decision;)).

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jgrochacommented, Nov 5, 2019

+1 to have libpq service connection parameter supported.

0reactions
tragiclifestoriescommented, Feb 5, 2021

This would be helpful at my place too, where we use the service file interface to make mTLS easier.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service connections in Azure Pipelines - Microsoft Learn
Enter the parameters for the service connection. The list of parameters differs for each type of service connection. For more information, see ...
Read more >
How to pass Service Connection as a parameter to a Task ...
I want to parameterize this in the task group, because we got two different service connection for each environment and we have 3...
Read more >
Using a variable for the service connection results in ...
When using a YAML pipeline in the Azure DevOps service and I'm using an Azure Resource Group Deployment task and have a variable...
Read more >
Is there any way to use a variable for a service connection to ...
For service connections, you can specify a value directly or use the 'compile-time variable' ${{xxx}}, which will expand and then populate the ...
Read more >
Create a Service Connection from an Endpoint
You create a connection from an endpoint when you know the base URI of a service and can provide the necessary parameters for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found