Bug Report
IvorySQL Version
IvorySQL 5.0 (based on PostgreSQL 18.0)
OS Version (uname -a)
Linux (any version)
Configuration options ( config.status --config )
N/A (affects all configurations)
Current Behavior
When using psql tab completion for ALTER TABLE <table> ALTER COLUMN <col> SET command, the completion shows INVISIBLEINCREMENT as a single option instead of separate INVISIBLE and INCREMENT options.
Example:
ivorysql=# alter table itest1 alter column a set
( COMPRESSION DATA TYPE EXPRESSION INVISIBLEINCREMENT MINVALUE NOT NULL STATISTICS
CACHE CYCLE DEFAULT GENERATED MAXVALUE NO START STORAGE
Expected behavior/code
The tab completion should display INVISIBLE and INCREMENT as two separate options:
ivorysql=# alter table itest1 alter column a set
( COMPRESSION DATA TYPE EXPRESSION INVISIBLE MINVALUE NOT NULL STATISTICS
CACHE CYCLE DEFAULT GENERATED INCREMENT MAXVALUE NO START STORAGE
Step to reproduce
- Connect to IvorySQL using psql in Oracle mode
- Create a table:
CREATE TABLE itest1 (a int, b text);
- Type:
ALTER TABLE itest1 ALTER COLUMN a SET and press TAB
- Observe that
INVISIBLEINCREMENT appears as a single option
Additional context that can be helpful for identifying the problem
The bug is caused by a missing comma in src/bin/psql/tab-complete.in.c at line 2925.
Before (buggy):
COMPLETE_WITH("(", "COMPRESSION", "DATA TYPE", "DEFAULT", "EXPRESSION", "GENERATED", "NOT NULL", "STATISTICS", "STORAGE", "INVISIBLE"
/* a subset of ALTER SEQUENCE options */
"INCREMENT", "MINVALUE", "MAXVALUE", "START", "NO", "CACHE", "CYCLE");
After (fixed):
COMPLETE_WITH("(", "COMPRESSION", "DATA TYPE", "DEFAULT", "EXPRESSION", "GENERATED", "NOT NULL", "STATISTICS", "STORAGE", "INVISIBLE",
/* a subset of ALTER SEQUENCE options */
"INCREMENT", "MINVALUE", "MAXVALUE", "START", "NO", "CACHE", "CYCLE");
In C, adjacent string literals without a comma are automatically concatenated, so "INVISIBLE" "INCREMENT" becomes "INVISIBLEINCREMENT".
This bug was introduced in commit 510fd2a when adding invisible column support.
Bug Report
IvorySQL Version
IvorySQL 5.0 (based on PostgreSQL 18.0)
OS Version (uname -a)
Linux (any version)
Configuration options ( config.status --config )
N/A (affects all configurations)
Current Behavior
When using psql tab completion for
ALTER TABLE <table> ALTER COLUMN <col> SETcommand, the completion showsINVISIBLEINCREMENTas a single option instead of separateINVISIBLEandINCREMENToptions.Example:
ivorysql=# alter table itest1 alter column a set
( COMPRESSION DATA TYPE EXPRESSION INVISIBLEINCREMENT MINVALUE NOT NULL STATISTICS
CACHE CYCLE DEFAULT GENERATED MAXVALUE NO START STORAGE
Expected behavior/code
The tab completion should display
INVISIBLEandINCREMENTas two separate options:ivorysql=# alter table itest1 alter column a set
( COMPRESSION DATA TYPE EXPRESSION INVISIBLE MINVALUE NOT NULL STATISTICS
CACHE CYCLE DEFAULT GENERATED INCREMENT MAXVALUE NO START STORAGE
Step to reproduce
CREATE TABLE itest1 (a int, b text);ALTER TABLE itest1 ALTER COLUMN a SETand press TABINVISIBLEINCREMENTappears as a single optionAdditional context that can be helpful for identifying the problem
The bug is caused by a missing comma in
src/bin/psql/tab-complete.in.cat line 2925.Before (buggy):
COMPLETE_WITH("(", "COMPRESSION", "DATA TYPE", "DEFAULT", "EXPRESSION", "GENERATED", "NOT NULL", "STATISTICS", "STORAGE", "INVISIBLE"
/* a subset of ALTER SEQUENCE options */
"INCREMENT", "MINVALUE", "MAXVALUE", "START", "NO", "CACHE", "CYCLE");
After (fixed):
COMPLETE_WITH("(", "COMPRESSION", "DATA TYPE", "DEFAULT", "EXPRESSION", "GENERATED", "NOT NULL", "STATISTICS", "STORAGE", "INVISIBLE",
/* a subset of ALTER SEQUENCE options */
"INCREMENT", "MINVALUE", "MAXVALUE", "START", "NO", "CACHE", "CYCLE");
In C, adjacent string literals without a comma are automatically concatenated, so
"INVISIBLE" "INCREMENT"becomes"INVISIBLEINCREMENT".This bug was introduced in commit 510fd2a when adding invisible column support.