一个人(一次)可以在一次交易中重组Firebird表吗? [英] Can one (repeatedly) restructure a Firebird table in a single transaction?

查看:75
本文介绍了一个人(一次)可以在一次交易中重组Firebird表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,我会像这样在A列上进行相对复杂的数据类型更改:

Normally, I'd do a relatively complicated change of data type on column A like this:

  • 创建新数据类型的列B
  • 将B设置为包含从A派生的新值
  • 丢弃A
  • 将B重命名为A

为了保证我的数据模型的有效性,我想在一次交易中执行这样的重组.到目前为止,我还无法做到这一点,因为根据隔离级别的不同,要么认为B不存在,要么不允许我重命名B(与并发更新发生更新冲突"),或者否发生错误,但B为空.是否可以执行我要求的操作-我很想看看如何-还是在两者之间绝对需要COMMIT?

To guarantee the validity of my data model, I'd like to perform such restructuring within a single transaction. So far, I have not been able to do that, because, depending on the isolation level, either B is not considered to exist yet, or I'm not allowed to rename B ("update conflicts with concurrent update"), or no errors occur but B is empty. Is it possible to perform to do what I ask - I'd love to see how - or is it absolutely required to COMMIT in between?

推荐答案

在使用似乎更合适的搜索词(元数据)以及通过de Firebird支持小组进行搜索之后,我发现这显然是不可能的.解决方法是分步进行迁移,并将其与备份结合在一起(这绝不是一个坏主意).

After searching using apparently more appropriate search terms (metadata), as well as via de Firebird support groups, I found that this is clearly not possible. The workaround is to do the migration in steps and combine it with backups (never a bad idea).

这篇关于一个人(一次)可以在一次交易中重组Firebird表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆