Re: psql: bogus descriptions displayed by \d+

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: bogus descriptions displayed by \d+
Date: 2011-08-04 18:26:15
Message-ID: 1312482375.24208.22.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On ons, 2011-07-27 at 17:57 -0400, Josh Kupershmidt wrote:
> > I think table_name is fine, and if you are very worried, add below
> that
> > a table_name also includes views (or whatever).
>
> It includes tables, views, composite types, and foreign tables. Is
> "table" really an appropriate description for all those objects?

Well, the facts are: According to the SQL standard, "table" includes
views and foreign tables. According to scientific-ish database
literature, a table is a relation and vice versa.

So to someone new who doesn't know much about the PostgreSQL jargon,
neither "table" nor "relation" are very precise at all.

But I would suggest that there is more support outside of PostgreSQL
jargon for finding that replacing "table" by "relation" does not
increase precision.

And indeed, even if you know the PostgreSQL jargon, "relation" means
anything stored in pg_class. And in almost all cases, a given command
does not successfully operate and any kind of pg_class object. So using
"relation" here creates some kind of illusion that will eventually fail,
forcing the user to manually figure out what actually works.

So the bottom line is, I would avoid the term "relation" and look for
other ways to add clarity and precision to the documentation.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-08-04 18:30:56 Re: psql: bogus descriptions displayed by \d+
Previous Message Peter Eisentraut 2011-08-04 18:11:34 Re: Transient plans versus the SPI API