Informix Error -532
-532 Cannot alter temporary table table-name.
The table shown is only a temporary table. It will vanish when this session ends. Such tables cannot be altered. To alter the shape of the table, simply drop it, and re-create it.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-532 fires when ALTER TABLE targets a temporary table — like renaming (-508/-509) and synonym
creation (-510), altering a temp table's structure isn't supported since the table only exists
for the current session anyway.
ALTER TABLEissued against a temp table, per the official guidance — the direct, only cause.- A misspelled table name that happens to collide with an existing temp table's name, when a permanent table was actually intended.
- Migration/DDL code that alters a mix of permanent and temp tables uniformly, without excluding the temp ones.
Solutions / Resolution
- Drop the temp table and re-create it with the desired shape, per the official guidance,
rather than attempting to alter it:
DROP TABLE temp_orders; CREATE TEMP TABLE temp_orders (order_id INT, status CHAR(10), ship_date DATE); - Review the spelling of the table name in case a permanent table was actually intended.
Examples
The disallowed attempt
CREATE TEMP TABLE staging_orders (order_id INT, status CHAR(10));
ALTER TABLE staging_orders ADD ship_date DATE;
-- -532: staging_orders is a temporary table
Working around it
DROP TABLE staging_orders;
CREATE TEMP TABLE staging_orders (order_id INT, status CHAR(10), ship_date DATE);
Diagnostic Checks
- Confirm whether the target table is temporary before attempting an
ALTER TABLE— if it was created withCREATE TEMP TABLEin the current session, re-creating it is the only path to a different shape.
Related Errors / Related Topics
- -508 — "Cannot rename a temporary table." The same temp-table restriction applied to renaming.
- -509 — "Cannot rename a column in a temporary table." The same restriction applied to column renames.
- -510 — "Cannot create synonym for temporary table table-name." The same restriction applied to synonym creation.
Part of the same family of temp-table restrictions as -508/-509/-510 — drop and re-create rather than trying to modify a temp table in place.