Possible to change PostgreSQL table design using LibreOffice Base?

偶尔善良 提交于 2019-12-11 10:13:04

问题


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.

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?


回答1:


In LO Base, it is not possible to modify existing columns using the graphical tools.

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;

See also Modifying table entries from LibreOffice Base, possible?



来源:https://stackoverflow.com/questions/34861831/possible-to-change-postgresql-table-design-using-libreoffice-base

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!