Description:
When defining a table in QuickSQL, the presence of the word “number” in a column comment causes the column’s datatype to change to NUMBER, even when a string type was specified.
Example:
my_table
org_no vc11 [Swedish organization number XXXXXX-XXXX.]
vat_nr vc20 [VAT number for non swedish companies.]
Generated SQL:
create table my_table (
id number default on null to_number(sys_guid(), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
constraint my_table_id_pk primary key,
org_no number,
vat_nr number
);
comment on column my_table.org_no is 'Swedish organization number XXXXXX-XXXX.';
comment on column my_table.vat_nr is 'VAT number for non swedish companies.';
Expected Behavior:
The datatypes for org_no and vat_nr should remain VARCHAR2(11) and VARCHAR2(20) respectively, regardless of the comment text.
Actual Behavior:
QuickSQL changes both columns to NUMBER due to the word “number” appearing in the comment.
Notes:
- Reproducible in current QuickSQL parser.
- Trigger condition: the token
number in a comment is likely being misinterpreted as a type indicator.
- May require disambiguation between comment text and type inference tokens.
Reported by: Mathias Magnusson mathias.magnusson@gmail.com
Description:
When defining a table in QuickSQL, the presence of the word “number” in a column comment causes the column’s datatype to change to
NUMBER, even when a string type was specified.Example:
Generated SQL:
Expected Behavior:
The datatypes for
org_noandvat_nrshould remainVARCHAR2(11)andVARCHAR2(20)respectively, regardless of the comment text.Actual Behavior:
QuickSQL changes both columns to
NUMBERdue to the word “number” appearing in the comment.Notes:
numberin a comment is likely being misinterpreted as a type indicator.Reported by: Mathias Magnusson mathias.magnusson@gmail.com