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

feat: qualify table name identifiers in dumper/loader #4

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

1dustycy
Copy link

@1dustycy 1dustycy commented Jun 25, 2024

Table name such as "user" is reserved in postgres. When using this kind of words for tablename, we need to qualify it using double quotes in queries

Executing following statement will run into error showing that the table schema is not correctly set:
image

SELECT "id",
       signin_type,
       signin_provider,
       signin_value,
       info,
       created_at,
       updated_at,
       referrer_id
FROM user
ORDER BY id, signin_value, created_at, updated_at, referrer_id ASC;

The fix is simply quotes the tablename FROM user -> FROM "user". And the statement will run.

Copy link
Owner

@Stumble Stumble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Stumble Stumble merged commit 9073298 into Stumble:main Jun 26, 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

Successfully merging this pull request may close these issues.

2 participants