Project

General

Profile

« Previous | Next » 

Revision 10158

bugfix: schemas/util.sql: col_names(): need to exclude dropped columns (which remain included in the pg_attribute table until the next tuple rewrite), by filtering on `NOT attisdropped`. lib/sql.py table_col_names() is not affected by this because it is able to access the column names from the DB driver directly, after performing `SELECT * FROM table LIMIT 0`.

View differences:

schemas/util.sql
688 688
    AS $_$
689 689
SELECT attname::text
690 690
FROM pg_attribute
691
WHERE attrelid = $1 AND attnum >= 1
691
WHERE attrelid = $1 AND attnum >= 1 AND NOT attisdropped
692 692
ORDER BY attnum
693 693
$_$;
694 694

  

Also available in: Unified diff