Revision 2783
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
903 | 903 |
JOIN pg_class ON pg_class.oid = conrelid |
904 | 904 |
JOIN pg_attribute ON attrelid = conrelid AND attnum = ANY (conkey) |
905 | 905 |
WHERE |
906 |
relname = %(table)s
|
|
907 |
AND conname = %(constraint)s
|
|
906 |
relname = '''+db.esc_value(table)+'''
|
|
907 |
AND conname = '''+db.esc_value(constraint)+'''
|
|
908 | 908 |
ORDER BY attnum |
909 |
''',
|
|
910 |
{'table': table, 'constraint': constraint})))
|
|
909 |
''' |
|
910 |
))) |
|
911 | 911 |
else: raise NotImplementedError("Can't list constraint columns for "+module+ |
912 | 912 |
' database') |
913 | 913 |
|
Also available in: Unified diff
sql.py: constraint_cols(): Use db.esc_value() instead of params