问题
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