Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgdND-0006fS-1q for pgsql-general@arkaria.postgresql.org; Thu, 04 Jun 2020 00:04:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jgdN9-0004ln-2D for pgsql-general@arkaria.postgresql.org; Thu, 04 Jun 2020 00:04:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgdLM-00012Z-Lq for pgsql-general@lists.postgresql.org; Thu, 04 Jun 2020 00:02:48 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jgdLJ-00064x-7M for pgsql-general@lists.postgresql.org; Thu, 04 Jun 2020 00:02:48 +0000 Received: by mail-qk1-x744.google.com with SMTP id n141so4277403qke.2 for ; Wed, 03 Jun 2020 17:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ABaEgyEAk9NcoDqisQGd5yoDb5YSEwXDmkbBHKtADfQ=; b=cds1QO2tTFetpXPWbm/Dw6VV130dAbf206+hOBEzw2AjA19O5Ks/CDnCqCcIWzgU2W vSjdbtcMO6jixhz45G1LtONyK2H8C85nOhxYh7fUwISkFOvsbFQ3IIVn/R66CjD/zE2Z u9N/A8CmbFwzSG16Q7CfudLpK9pugmQSf6HJUDmAuKCwlQFxnl/OTeGgokrDVC00QsBy GGcHnwKUqyYbHZXglwzEvi4SGa9VHly0frAoUt53iIDwGCk9bJg6++DeAtOHFtu//uhM tEdjyViHin6xR9ce1ePkpDbRHV7KF5PeMLAs0t0TsQinkeerovtVF79qVrGlqexx9yEU zNTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ABaEgyEAk9NcoDqisQGd5yoDb5YSEwXDmkbBHKtADfQ=; b=Yj/ojSi9ZxX/jMY6p0jaH9vySDiY4wYgGNyReuZd012g/OEeN+Q3zuK/3LIbrFZh4y hgVtIecSOrWQs2n5HaP1Pv0PjDF/+CcbnqqJKZJP1jRufzodGmsor3siYHdhv7GNyTso Z1wNHWY6Dw0cHWNaCmeF9NLsD9zVemAtmugShpyUh1+/KM3eq63RuSEKMlMln41XRUC0 2uetrQBV8mwLmJKEHFg/Ri0GOepYBlm7HOqbQMiqUBgdbHWb6suVikXi2W4r2rEvmvrs d/ORpP07aYg/ncD6ViQ+MsfdlRqXqw6MFs2IzX2XpZoqdH5wY22bnngMWSP5w6cSwoQB 0trQ== X-Gm-Message-State: AOAM530CPaO9hy4gLjvkIYZqZyYGfBKN59ESIraSRVNjyDYzGwHTLe3q 6hJsluLZxjD9Y3bxrMT+0xx4Tg== X-Google-Smtp-Source: ABdhPJyIF8nzUwfoKa3DqinM/4KhMcfGgau40aOyRnkmaWFh8RjtEPnTGSbRCci87pTNUPe2aLl7Hg== X-Received: by 2002:a37:64c2:: with SMTP id y185mr2361039qkb.186.1591228963443; Wed, 03 Jun 2020 17:02:43 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id j5sm3298312qtr.73.2020.06.03.17.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 17:02:42 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 84B2B300A03; Wed, 3 Jun 2020 18:32:14 -0400 (-04) Date: Wed, 3 Jun 2020 18:32:14 -0400 From: Alvaro Herrera To: Martin Mueller Cc: Andreas Joseph Krogh , Chris Travers , "pgsql-generallists.postgresql.org" Subject: Re: Oracle vs. PostgreSQL - a comment on Mysql Message-ID: <20200603223214.GA12556@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3A33195B-6B00-4C89-BFBE-1E43C5F07FDB@northwestern.edu> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jun-03, Martin Mueller wrote: > On the topic of what other databases do better: I much prefer Postgres to Mysql because it has better string functions and better as well as very courteous error messages. But MySQL has one feature that sometimes makes me want to return it: it stores the most important metadata about tables in a Mysql table that can be queried as if it were just another table. That is a really feature. I makes it very easy to look for a table that you edited most recently, including a lot of other things. > > Why doesn’t Postgres have that feature? Or is there a different and equally easy way of getting at these things that I am just missing? Every little schema detail in Postgres is in a catalog table that you can query. See pg_class for a list of relations; pg_attribute for attributes; and so on. You can learn a lot about them just by running "psql -E" and executing \d -- look at the queries that appear above the resultset. We even have a whole section in our docs about the layout of the system catalogs. Also, there are views that make the whole thing easier. See https://www.postgresql.org/docs/devel/catalogs.html -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services