Search Postgresql Archives

Re: Oracle vs. PostgreSQL - a comment on Mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux