From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Martin Mueller <martinmueller(at)northwestern(dot)edu> |
Cc: | Andreas Joseph Krogh <andreas(at)visena(dot)com>, Chris Travers <chris(dot)travers(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Oracle vs. PostgreSQL - a comment on Mysql |
Date: | 2020-06-03 22:32:14 |
Message-ID: | 20200603223214.GA12556@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Nolan | 2020-06-03 22:41:37 | A parsing question |
Previous Message | Adrian Klaver | 2020-06-03 22:31:06 | Re: Oracle vs. PostgreSQL - a comment on Mysql |