Revision 10158
Added by Aaron Marcuse-Kubitza over 11 years ago
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
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`.