Skip to content

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

Merged
Stumble merged 1 commit intoStumble:mainfrom
1dustycy:main
Jun 26, 2024
Merged

feat: qualify table name identifiers in dumper/loader #4
Stumble merged 1 commit intoStumble:mainfrom
1dustycy:main

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

Comments