Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Escape tablename for avoiding table naming issue. #10

Open
onlinemad opened this issue Aug 23, 2021 · 1 comment
Open

Escape tablename for avoiding table naming issue. #10

onlinemad opened this issue Aug 23, 2021 · 1 comment

Comments

@onlinemad
Copy link

Hi,

It will occur "column "id" does not exist" if the table named "user" durning diff process. So, it might be escape table name for avoiding table naming issue.

FROM {tablename}

Thank you.

@akamai-drosser
Copy link

akamai-drosser commented Jan 25, 2022

I have run into this issue as well, the fix seems simple enough (putting quotes around {tablename}:

...
SQL_TEMPLATE_HASH = f"""
SELECT md5(array_agg(md5((t.*)::varchar))::varchar)
FROM (
SELECT *
FROM "{tablename}"
ORDER BY {pk} limit :row_limit offset :row_offset
) AS t;
"""
...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants