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

Make ALTER TABLE foo ALTER COLUMN a SET DATA TYPE text options unrepresentable #508

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

andrew-farries
Copy link
Collaborator

Ensure that SQL statements of the form:

ALTER TABLE foo ALTER COLUMN a SET DATA TYPE text COLLATE "en_US"
ALTER TABLE foo ALTER COLUMN a SET DATA TYPE text USING 'foo'

are converted to raw SQL operations instead of an OpAlterColumn operation. The change of collation is not currently representable by an OpAlterColumn operation and neither is the USING clause.

Part of #504

Ensure that a SQL statement of the form:

```sql
ALTER TABLE foo ALTER COLUMN a SET DATA TYPE text COLLATE "en_US"
```

is converted to raw SQL instead of an `OpAlterColumn` operation. The
change of collation is not currently represntable by an `OpAlterColumn`
operation.
Ensure that a SQL statement of the form:

```sql
ALTER TABLE foo ALTER COLUMN a SET DATA TYPE text USING 'foo'
```

is converted to raw SQL instead of an `OpAlterColumn` operation. The
`USING` clause is not currently represntable by an `OpAlterColumn`
operation.
@andrew-farries andrew-farries added the sql2pgroll Issues relating to the sql2pgroll package label Dec 4, 2024
@andrew-farries andrew-farries marked this pull request as ready for review December 4, 2024 11:44
@andrew-farries andrew-farries merged commit 5b7980d into main Dec 4, 2024
27 checks passed
@andrew-farries andrew-farries deleted the pgroll2sql-unrepresentable-set-types branch December 4, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql2pgroll Issues relating to the sql2pgroll package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants