Skip to content

Redshift connection fails with CURRENT_SETTING('server_version') #245

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

Closed
jaakla opened this issue Aug 5, 2024 · 1 comment
Closed

Redshift connection fails with CURRENT_SETTING('server_version') #245

jaakla opened this issue Aug 5, 2024 · 1 comment

Comments

@jaakla
Copy link

jaakla commented Aug 5, 2024

AWS Redshift should use postgres-compatible API, therefore ATTACH ... TYPE POSTGRES would be expected to worth to try.

It does seem to connect and authenticate in lower level, but then fails with error: SQL Error: Invalid Error: Failed to execute query "SELECT CURRENT_SETTING('server_version'), (SELECT COUNT(*) FROM pg_settings WHERE name LIKE 'rds%')": ERROR: must be superuser to examine "server_version"

The first query directly in Redshift (SELECT CURRENT_SETTING('server_version')) is rejected for my (typical user) permissions indeed. The second one (SELECT COUNT(*) FROM pg_settings WHERE name LIKE 'rds%') works but returns 0 for me. I'm not sure what it is supposed to query here. As replacement for first I could use SELECT version(); successfully, this returns 'PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.71629�'

So why not use SELECT version();

@jaakla
Copy link
Author

jaakla commented Aug 5, 2024

duplicate of #181

@jaakla jaakla closed this as completed Aug 5, 2024
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

No branches or pull requests

1 participant