sql - Is there any way to tell if a database row has constraints? -
i'm using perl dbi postgresql, , users deleting rows table, of can't deleted because of foreign key constraints, fine, want way mark rows on front end it's known rows have constraints before trying delete them. right now, user hit "delete" , either error or have row deleted.
i'm not terribly familiar postgresql, believe can use:
select * information_schema.table_constraints table_name = 'yourtable' update- looks solid answer here: postgres: sql list table foreign keys
Comments
Post a Comment