[Gambas-user] BUG: postgresql dropped columns

Bruce Bruen bbruen at ...2308...
Fri Nov 19 10:18:27 CET 2010


If a column from a postgresql table is dropped, postgresql does not actually 
remove the column,  from the help files:

"The DROP COLUMN form does not physically remove the column, but simply makes 
it invisible to SQL operations. Subsequent insert and update operations in the 
table will store a null value for the column. Thus, dropping a column is quick 
but it will not immediately reduce the on-disk size of your table, as the 
space occupied by the dropped column is not reclaimed. The space will be 
reclaimed over time as existing rows are updated. (These statements do not 
apply when dropping the system oid column; that is done with an immediate 
rewrite.)"
(My emphasis)

Gambas does not respect this and continually returns a database error on 
subsequent row updates, viz:
Database level error (-1) Cannot modify record: ERROR:  column 
"........pg.dropped.8........" of relation "track" does not exist

This is a fundamental error.
-- 
best regards
Bruce Bruen



More information about the User mailing list