Apache OpenOffice (AOO) Bugzilla – Issue 19087
Tables cannot be edited after saving them via postgresql odbc driver
Last modified: 2013-08-07 15:45:41 UTC
Hi! I configured OO1.1rc3 (Debian unstable) and unixodbc / odbc-postgres on my Desktop machine and a posgresql DB on my server. Configuring Datasources works fine when there is a proper /etc/odbc.ini on my desktop. Creating a table works fine. I can create fields in it etc. But when I save the table I never ever can change an existing fields name or type after that. I only can add more fields. The docu says, that a table must not be open to make that possible. But actually I cannot see any open table. I tried everything to be sure that this table is not open somewhere else... The table editor is the only OO window that is open. Is this a known issue, did I find a bug or am I just too stupid to manage that? Regards and thanks for that wonderful application. OO rulez! -Marc
It's not about your real problem, but: If the docu is really stating this, it's wrong (probably simply obsoleted, in the past, it was indeed that tables could not be edited while their data was displayed). schiffi, could you please describe where in the help/docu you found this information, so we can correct it?
The text can be found here: Help --> Index --> table design (bottom of page): "If you want to change the name or change the type of a data field, the table itself must not be opened for data entry; open the table only in the design view." So if the docu is outdated here, how can I then change data fields after saving a table? Or is that currently not possible at all? -Marc
submitted issue 19109 for the wrong help content OOo asks the database driver for it's capabilities to drop/append/modify table columns, and disables the respective user interface if the driver claims that these functionalities are not available. I currently can't check this, but I suppose that this is what you encounter here - a driver which tells OOo than modifying columns is not possible.
I am using unixodbc which provides the isql commandline frontend to odbc. If I use isql choosing a DSN from /etc/odbc.ini to connect to the DB like OO does I am able to alter a table like this: homer:~# isql PostgreSQL-wss +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> ALTER TABLE stammdaten RENAME zuname TO name SQL> quit homer:~# this works for example. And ist over odbc. No other Idea?
Your observation doesn't contradict my explanation :) In fact, OOo does not try the ALTER TABLE statement, but it asks the driver (on some meta level) if it *supports* it. If the driver lies (and unfortunately this happens way too often in the wild :(), then OOo does not even attempt to do an ALTER.
Okay, I was wrong, for *altering* a column there is no meta data information (but for drop and append, there is). Hmm, no other explanation at the moment, needs to be investigated in more detail ...
Hi all, I can reproduce this with a postgres odbc driver. I send it to the right developer, correct the summary and set a target. Bye Marc
.
"According to the OpenOffice.org roadmap (http://tools.openoffice.org/releases) this issue was retargeted to OOo Later."
change subcomponent to 'none'
Hi Marc, the problem here is that SQL92 doesn't define an ALTER TABLE statement. So there is no way to know how the ALTER TABLE statement should look like. The altering of tables is in that case only possible if you use the native driver for PostgreSQL. The same applies for MySQL. When using the ODBC or JDBC directly, alter table isn't supported but when using the MySQL database type it is. (This is done by a wrapper around the ODBC/JDBC bridge which does only the altering and some other stuff). http://dba.openoffice.org/drivers/postgresql/index.html Best regards, Ocke PS: Set to Invalid, because there is no Can't fix :-)
Closing it.