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

Syntax Error on ALTER TABLE with USING Clause in pg-mem #434

Open
jamesvillarrubia opened this issue Dec 11, 2024 · 0 comments
Open

Syntax Error on ALTER TABLE with USING Clause in pg-mem #434

jamesvillarrubia opened this issue Dec 11, 2024 · 0 comments

Comments

@jamesvillarrubia
Copy link

jamesvillarrubia commented Dec 11, 2024

Describe the bug

When attempting to alter a table column type with a USING clause, pg-mem throws a syntax error. This operation is supported by PostgreSQL but seems to be either unimplemented or incorrectly handled in pg-mem. This would be helpful for migration testing.

To Reproduce

To reproduce the issue, you can run the following SQL command on the pg-mem playground:

CREATE TABLE chunks (userId text);
ALTER TABLE "chunks" ALTER COLUMN "userId" TYPE integer USING ("userId"::integer);

This command should convert the userId column from text to integer using a cast, but it fails in pg-mem while it succeeds in an actual PostgreSQL database.

pg-mem version

3.0.4

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

No branches or pull requests

1 participant