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

Make application_name pg client init param configurable #110

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

mecampbellsoup
Copy link
Contributor

Allows client conns to specify a value for application_name instead of just hard-coding to "pgmoon", e.g.:

    pg_settings = {
        host = ip,
        port = '5432',
        database = os.getenv('POSTGRES_DATABASE'),
        user = os.getenv('POSTGRES_USERNAME'),
        password = os.getenv('POSTGRES_PASSWORD'),
        application_name = 'api-gateway'  -- previously this was hardcoded to "pgmoon"
    }

@leafo I should just be able to run make build to generate the *.lua files correct?

Resolves #107.

@leafo
Copy link
Owner

leafo commented Oct 13, 2021

@mecampbellsoup That's correct, make build will generate lua files from the corresponding moon files. We should check in all generated lua files so luarocks can install the module without any compile step or additional dependencies.

@leafo leafo merged commit 2a609d7 into leafo:master Oct 13, 2021
leafo added a commit that referenced this pull request Oct 13, 2021
@mecampbellsoup mecampbellsoup deleted the mc/application-name-init-param branch December 25, 2021 14:38
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.

Possible to set application_name for client connection?
2 participants