Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkqLT-0004d5-Nu for pgadmin-hackers@arkaria.postgresql.org; Fri, 16 Sep 2016 10:26:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bkqLT-0003BQ-AX for pgadmin-hackers@arkaria.postgresql.org; Fri, 16 Sep 2016 10:26:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bkqLF-0002hE-W0 for pgadmin-hackers@postgresql.org; Fri, 16 Sep 2016 10:25:58 +0000 Received: from mail-it0-x22e.google.com ([2607:f8b0:4001:c0b::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bkqLC-0002wO-C1 for pgadmin-hackers@postgresql.org; Fri, 16 Sep 2016 10:25:57 +0000 Received: by mail-it0-x22e.google.com with SMTP id 186so12985967itf.0 for ; Fri, 16 Sep 2016 03:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=udb78YvOAfaZKyF3VQLcabYDHD6x1SP0rxTB4zP9qfY=; b=lZLaTHsS4V5PDgoAsRhHFDSfG/bODE5+bQB2qRYJ1DHmgwmbfjNsjrRiYCqH6Ia/pg N7g2uyGLvcml8xMgGCANgJUumCK9QIkdZnRVbe2EIX464RxANenJSuCS1EJwb8P2yVmH 0trbc05B2YiFMkipQzZuc7LzguoDtVGlbqcEAvE+dyTDqKH3EbwABo3mJG8UNjGoTZZm D7tBvcz/Y2aiZ7AX3IIh3mYmL+jCmxH/kBKtaks0V2/jnKuO4x5BuMbEHoToJtGtc1Yv wHHSKedLYCk2YcaQzoo7W3K0Z9evzVo9HVLfe0yfKMbOYBALGaFLa5g2d/0P7e6MSTvB 1xNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=udb78YvOAfaZKyF3VQLcabYDHD6x1SP0rxTB4zP9qfY=; b=hCFCNPDjuiGD6blCxwv4BTQaVfu3vW2WLEjfFKcvJltJ3qNQcZqdOfTbgyei70VmAl 0P78pbytd+gS52Y+an/M2yJveJeFLF5qJi3j0zw87Fgg04tRmxtxXDNvpOCjJ8a4N32F BRViB1sdGlqZQt0HeFj+mpbDugKzaLGYralxr16Vg9ciYCDbSiJ/Dm8dMt4rWvVJt+QN vsndM1UC145pnn5oNoTd3KbStoaE2eMM2msKvZbuBzsvdqvG+GnM+NYNgB/3G5wZkH6s XPumMDHnFixan0NxJ+348Rgt6e5aN3EmvdVsEzN3vrKrL9lYjgZD/E5shW9ixt3SePmp JDPQ== X-Gm-Message-State: AE9vXwNE44X3iQd42T9pxYh3Rh9mbgKUr5QrLkgUxyXJkQzDVuGO/DHDrfQWKv+rhFnvBbqdgXmlpo72kdQvAA== X-Received: by 10.36.74.138 with SMTP id k132mr4627244itb.85.1474021552693; Fri, 16 Sep 2016 03:25:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.1.203 with HTTP; Fri, 16 Sep 2016 03:25:51 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 16 Sep 2016 11:25:51 +0100 Message-ID: Subject: Re: Sequence queries on pg_depend lacking classid filter To: Magnus Hagander Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Thanks - committed with a minor change to remove a duplicate WHERE clause that you added to one of the queries. On Thu, Sep 15, 2016 at 5:22 PM, Magnus Hagander wrote: > 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/ > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers