https://bugs.documentfoundation.org/show_bug.cgi?id=171470

Alex Thurgood <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEEDINFO

--- Comment #7 from Alex Thurgood <[email protected]> ---
This is what I see with




In an embedded HSQLDB file, I have a table REPLEGAL with a field PCode (for
postcodes in France). I originally designated the field type as VARCHAR.

I enter the table design mode (right mouse button click on the table icon, and
choose Edit from the dropdown menu.

When the table design window opens for editing, I click on the field type of
the field I want to change, and select the new type from the dropdown menu. I
chose "smallint", as this is a 5 character long field type which (in theory at
least) should allow me to enter postcodes as a numeric string (we'll ignore the
problem with leading zeroes, as that is irrelevant to the issue at hand).

When I try to do this, I get a message:

"Impossible to alter column "PCode". Should the column be deleted and the new
format added ?"

The detailed error message behind this is:
"Numeric value out of range in statement  [ALTER TABLE "REPLEGAL" ALTER COLUMN
"PCode" SMALLINT NOT NULL]"

If I click on OK, I get a further error message:
"Column constraints are not acceptable in statement [ALTER TABLE "REPLEGAL" ADD
"PCode" VARCHAR(10) NOT NULL]"


If I then click on OK, I'm taken back to the table design edit window. If I
close that, and refuse to save, the original field gets deleted from the table
- this is a bug (possibly already referenced), as it shouldn't carry out half
of the instruction, but rollback to the previous state.

The error message is pretty explicit in the above case - you can't change a
Text(VARCHAR) field for a smallint(5) field. However, if you change the VARCHAR
field for a BIGINT, then the change can be saved.


As we still don't really know how you are attempting to change the field type,
you haven't explained in detail with reference to the UI what you are doing, I
can't say whether this matches the behaviour you are experiencing.

If I just right mouse button click the grey portion to the left of the field
definition in table design mode, I do effectively only see a context menu with
Cut, Paste, Delete, Primary Key, as the choices. This isn't the way you alter
the field type though. The field type is altered by left mouse button clicking
on the field type value to give you a dropdown list.


Please provide a more detailed description of how you are interacting with the
UI in table design mode.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to