Skip to content

Add error prone SQL in README.md #567

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

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

xelatirdan
Copy link
Contributor

Getting the error when adding non-root postgres user for exporter:

postgres=# CREATE OR REPLACE FUNCTION get_pg_stat_statements() RETURNS SETOF pg_stat_statements AS
postgres-# $$ SELECT * FROM public.pg_stat_statements; $$
postgres-# LANGUAGE sql
postgres-# VOLATILE
postgres-# SECURITY DEFINER;
ERROR:  type "pg_stat_statements" does not exist

Add following sql command for enable pg_stat_statements:

CREATE EXTENSION IF NOT EXISTS pg_stat_statements;

@xelatirdan xelatirdan changed the title Add some none error prone SQL in README.md Add some error prone SQL in README.md Aug 5, 2021
@xelatirdan xelatirdan changed the title Add some error prone SQL in README.md Add error prone SQL in README.md Aug 5, 2021
@danpoltawski
Copy link

+1 for this fix

@SuperQ
Copy link
Contributor

SuperQ commented Aug 25, 2021

This needs a DCO sign off to be merged.

You can run git commit -s --amend and then get push -f to add it.

Getting the error when adding non-root postgres user for exporter:
```
postgres=# CREATE OR REPLACE FUNCTION get_pg_stat_statements() RETURNS SETOF pg_stat_statements AS
postgres-# $$ SELECT * FROM public.pg_stat_statements; $$
postgres-# LANGUAGE sql
postgres-# VOLATILE
postgres-# SECURITY DEFINER;
ERROR:  type "pg_stat_statements" does not exist
```
Add following sql command for enable pg_stat_statements:
```
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
```

Signed-off-by: Xela Tirdan <[email protected]>
@xelatirdan
Copy link
Contributor Author

@SuperQ Done

@xelatirdan
Copy link
Contributor Author

@SuperQ Review please

@sysadmind sysadmind merged commit 9944679 into prometheus-community:master Feb 10, 2022
@xelatirdan xelatirdan deleted the patch-1 branch February 25, 2022 15:49
ritbl pushed a commit to heniek/postgres_exporter that referenced this pull request Mar 19, 2023
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.

5 participants