可以使用LibreOffice Base更改PostgreSQL表设计吗? [英] Possible to change PostgreSQL table design using LibreOffice Base?
问题描述
我了解到LibreOffice Base具有本机Postgres驱动程序,因此我认为这可能是解决数据库结构,创建新表,更改和删除现有表等的好方法。
I read that LibreOffice Base has a native Postgres driver, so I thought that might be a good way to play around with the database structure, creating new tables, altering and dropping existing ones etc.
几乎所有内容都可以正常工作。我可以连接到数据库并打开和编辑所有表,创建新表,删除现有表。除了更改现有列的数据定义外,我基本上可以做所有事情。因此,我可以完全删除该列,并且可以轻松地在同一张表中创建新列。但是一旦它们到了,我就不能再更改了,相应的选项在Base中显示为灰色。
Almost everything seems to work fine. I can connect to the DB and open and edit all tables, create new ones, delete existing ones. I can basically do everything, except change the data definition of existing columns. So, I could delete the column entirely, and I can easily create new columns in the same table. But once they're there, I cannot change them anymore, the respective options are greyed out in Base.
这可能是错误还是我错过了其他东西?
Could this be a bug or am I missing something else?
推荐答案
在LO Base中,无法使用图形工具修改现有列。
In LO Base, it is not possible to modify existing columns using the graphical tools.
相反,转至工具
-> SQL
主菜单栏。这将显示一个对话框,您可以在其中输入 ALTER TABLE
命令。例如(来自 postgres文档):
Instead, go to Tools
-> SQL
in the main menu bar. This will show a dialog where you can enter an ALTER TABLE
command. For example (from the postgres docs):
ALTER TABLE distributors RENAME COLUMN address TO city;
另请参见是否可以从LibreOffice Base修改表条目?
这篇关于可以使用LibreOffice Base更改PostgreSQL表设计吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!