Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create README.md #17

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Create README.md #17

merged 2 commits into from
Apr 24, 2024

Conversation

gacarrillor
Copy link
Contributor

No description provided.

README.md Outdated

### pg_service.conf location

Before using the plugin, make sure you've set the `PGSERVICEFILE` environment variable pointing to the `pg_service.conf` file path.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed for linux too or does it have a default location?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is delegated to the lib https://github.com/opengisch/pgserviceparser, it might be better to state this?

Copy link
Contributor Author

@gacarrillor gacarrillor Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://www.postgresql.org/docs/current/libpq-pgservice.html, we have both a per-user and a system default locations.

Per-user: ~/.pg_service.conf or %APPDATA%\postgresql\.pg_service.conf
System: /etc/postgresql-common/pg_service.conf (run pg_config --sysconfdir to get the directory).

On the other hand, even if the variable is not set, the plugin (in fact, the underlying lib) will attempt to find the pg_service.conf file at ~/.pg_service.conf.

So, we probably need to rephrase this line in the README.

The underlying lib could also be adjusted, so as to try to locate the file in the system location if not found in the per-user one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's a canonical doc in the lib, a link from here would be ok too.
Main point is, if it's documented here, better it is correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I was playing safe for a first version of the README: Setting the variable will always allow the plugin to work predictably. However, let's rephrase it so that it's clear that if a user has a .pg_service.conf already in ~/, she/he can avoid setting the variable.

I think the lib docs could be a bit hard to read for a regular user, so if you guys don't mind I'd state that here in the README.

Copy link
Member

@m-kuhn m-kuhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Let's do this and follow up if needed.

@gacarrillor gacarrillor merged commit c4dcd93 into main Apr 24, 2024
3 checks passed
@gacarrillor gacarrillor deleted the create_readme branch April 24, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants