-
-
Notifications
You must be signed in to change notification settings - Fork 252
Invalid PostgreSQL ALTER TYPE ... RENAME TO ... statements #898
Copy link
Copy link
Closed
Description
Description
The new type identifier in PostgreSQL ALTER TYPE old_ident RENATE TO new_ident statements is encoded as a string value instead of an identifier, triggering a syntax error.
Steps to Reproduce
Type::alter().name(OldIdent).rename_to(NewIdent)Expected Behavior
Should be compiled to
ALTER TYPE "old_ident" RENAME TO "new_ident"or
ALTER TYPE old_ident RENAME TO new_identActual Behavior
Is compiled to
ALTER TYPE "old_ident" RENAME TO 'new_ident'which is an invalid syntax for this statement.
Reproduces How Often
Always reproducible.
Versions
I'm using 0.32, but this bug is present since the implementation of ALTER TYPE in #42 .
Additional Information
The line triggering the bug: https://github.com/SeaQL/sea-query/blame/16226158bf9dc825bbc49f0b678bccd7c3eb15df/src/backend/postgres/types.rs#L116
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels