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

RM-70 cap sqlalchemy-redshift < 0.8.13 #235

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

Brunope
Copy link
Collaborator

@Brunope Brunope commented Mar 30, 2023

sqlalchemy-redshift recently released a new version with this problematic looking code

    def get_table_oid(self, connection, table_name, schema=None, **kw):
        """Fetch the oid for schema.table_name.
        Return null if not found (external table does not have table oid)"""
        schema_clause = (
            "AND schema = '{schema}'".format(schema=schema) if schema else ""
        )

        result = connection.execute("""
                        SELECT table_id
                        FROM
                            SVV_TABLE_INFO
                        WHERE 1
                            {schema_clause}
                            AND "table" = '{table_name}';
                        """.format(
                                schema_clause=schema_clause,
                                table_name=table_name)
                            )

        return result.scalar()

@ryantimjohn
Copy link
Contributor

LGTM, saw the chat with @choprashweta

@ryantimjohn ryantimjohn merged commit de9c945 into main Mar 31, 2023
@Brunope Brunope deleted the RM-70-insufficient-privilege branch March 31, 2023 18:12
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.

2 participants