Sequence queries on pg_depend lacking classid filter

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Sequence queries on pg_depend lacking classid filter
Date: 2016-09-15 16:22:32
Message-ID: CABUevEwVtw1zL03TTmo66-g9P9BfTsy8s22beUthrWhDRfc9aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

There are a number of cases where queries in both pgadmin4 and pgadmin3 are
done against pg_depend but falis to constrain the query on classid.

In particular, if for example a constraint and a sequence exists with the
same oid (which is perfectly valid, as they are in different tables), a
column will suddenly refer sequences that are completely incorrect. When we
look up sequences, we have to make sure we only match dependencies against
pg_class.

AFAICT, the following patch catches the important ones. I could go ahead
and push it, but given that we're in RC I'd appreciate a round of review
before doing that, even though it looks fairly simple.

I've got the same changes in a patch to pgadmin3, as these queries are
basically a copy/paste from there. But let's focus the review on the one
for pgadmin4 :)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

Attachment Content-Type Size
depend.patch text/x-patch 7.7 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Devrim Gündüz 2016-09-16 08:13:31 Re: python-click dependency
Previous Message Susan Douglas 2016-09-15 14:55:39 Documentation patch for pgAdmin 4