Skip to content

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

Closed
@jaakla

Description

@jaakla

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions