1

My user table is referenced in multiple tables. Is there some way to find which all rows in my user table is referenced in other tables without checking with individual tables that reference user table?

If i try to delete a user, posgres shows me

ERROR:  update or delete on table "user" violates foreign key constraint "user _client_fkey" on table "client"
DETAIL:  Key (id)=(1) is still referenced from table "user".

Using this feature is there some way can i get all the userids that are referenced in other tables?

Davis
  • 310
  • 1
  • 3
  • 14

1 Answers1

0

Sure just do a 'select * from client where user_id = 1;

Mr Chow
  • 365
  • 6
  • 10