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
Better support for DDL statements that cannot run within a transaction #851
Comments
Despite having this in NetezzaDbSupport.java
|
As per JavaDoc: Checks whether ddl transactions are supported for this database. It is purely informative, as to how to behave in case of failure. Which DDL statement is failing? Is it part of a regular migration? What other limitations does Netezza have? (Not all abstractions to support them may be present in the core yet) |
Any news? |
ALTER TABLE statements fail See the Netezza documentation for further information. Basically, the following list of statements are NOT permitted within a transaction
|
Ok, thanks. Let's revisit this in the 3.2 timeframe to see if the necessary abstractions can be put in place to make this easier to implement. |
Is there currently any way to get arround this ? I am getting |
Not to my knowledge. |
I stumbled onto the limitations section of the postgres page for your docs: and managed to re-write the query in a transaction safe way (pasting it here, if someone else stumbles across this: ALTER TYPE action_type RENAME TO stale_action_type;
CREATE TYPE action_type AS ENUM(
'loginFailure',
'loginSuccess',
...
);
ALTER TABLE mytable ALTER COLUMN action TYPE action_type USING action::text::action_type;
DROP TYPE stale_action_type; |
@kryptt Thanks! For the archive, you can use full expressions for the ALTER TABLE foo
ALTER COLUMN bar TYPE new_type USING (
CASE bar :: TEXT
WHEN 'AAA'
THEN 'BBB'
ELSE bar :: TEXT END) :: new_type; |
@kryptt Thanks a lot for W/A. I have the same problem too. |
This has been fixed for PostgreSQL via auto-detection. Please open new issues for other databases. |
Overriding DbSupport.supportsDdlTransactions does not prevent FlyWay from attempting to execute DDL statements in a transaction.
I was trying to implement Netezza support, but found that ALTER TABLE statements fail when executed in a transaction.
See
http://www-01.ibm.com/support/knowledgecenter/SSULQD_7.1.0/com.ibm.nz.dbu.doc/r_dbuser_ntz_sql_func_categories_transaction_control.html
The text was updated successfully, but these errors were encountered: