Issue 19087 - Tables cannot be edited after saving them via postgresql odbc driver
Summary: Tables cannot be edited after saving them via postgresql odbc driver
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC3
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ocke.janssen
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-05 00:08 UTC by Unknown
Modified: 2013-08-07 15:45 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-09-05 00:08:21 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
Comment 1 Frank Schönheit 2003-09-05 08:32:17 UTC
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?
Comment 2 Unknown 2003-09-05 10:59:30 UTC
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
Comment 3 Frank Schönheit 2003-09-05 11:35:18 UTC
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.
Comment 4 Unknown 2003-09-05 13:13:03 UTC
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?

Comment 5 Frank Schönheit 2003-09-08 08:39:11 UTC
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.
Comment 6 Frank Schönheit 2003-09-08 08:52:13 UTC
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 ...
Comment 7 marc.neumann 2003-09-08 09:13:48 UTC
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
Comment 8 ocke.janssen 2003-09-22 10:34:18 UTC
.
Comment 9 marc.neumann 2003-09-29 11:21:48 UTC
"According to the OpenOffice.org roadmap
(http://tools.openoffice.org/releases) this issue was retargeted to
OOo Later." 
Comment 10 hans_werner67 2004-02-02 12:14:11 UTC
change subcomponent to 'none'
Comment 11 ocke.janssen 2004-05-26 10:04:44 UTC
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 :-)
Comment 12 ocke.janssen 2007-11-02 07:27:27 UTC
Closing it.