Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-13 Thread Tom Lane
Robert Haas writes: > On the other hand, I am also not entirely sure such a change in > terminology would be a net improvement in clarity, even though it does > seem better in some cases. For example, the CREATE TABLE command does > not create a viewed table; nor is there any CREATE VIEWED TABLE

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-13 Thread Robert Haas
On Sat, Aug 13, 2011 at 1:56 PM, Peter Eisentraut wrote: > On fre, 2011-08-12 at 16:14 -0400, Robert Haas wrote: >> On Fri, Aug 12, 2011 at 4:11 PM, Peter Eisentraut wrote: >> > "A table is either a base table, a derived table, a transient table, or >> > a viewed table." (SQL/MED adds "foreign ta

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-13 Thread Peter Eisentraut
On fre, 2011-08-12 at 16:14 -0400, Robert Haas wrote: > On Fri, Aug 12, 2011 at 4:11 PM, Peter Eisentraut wrote: > > "A table is either a base table, a derived table, a transient table, or > > a viewed table." (SQL/MED adds "foreign table".) > > > > Just FYI. > > Base table seems clear enough, an

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-12 Thread Robert Haas
On Fri, Aug 12, 2011 at 4:11 PM, Peter Eisentraut wrote: > On tor, 2011-08-04 at 14:59 -0400, Robert Haas wrote: >> > 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

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-12 Thread Peter Eisentraut
On tor, 2011-08-04 at 14:59 -0400, Robert Haas wrote: > > 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 what are you supposed to call it if you

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-04 Thread Jeff Davis
On Thu, 2011-08-04 at 14:20 -0500, Kevin Grittner wrote: > Peter Eisentraut wrote: > > > According to scientific-ish database literature, a table is a > > relation and vice versa. > > I've generally understood the terms more like what is described near > the top of this page: > > http://en.w

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-04 Thread Kevin Grittner
Peter Eisentraut wrote: > According to scientific-ish database literature, a table is a > relation and vice versa. I've generally understood the terms more like what is described near the top of this page: http://en.wikipedia.org/wiki/Relation_%28database%29 "In SQL, [...] a relation varia

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-04 Thread Robert Haas
On Thu, Aug 4, 2011 at 2:26 PM, Peter Eisentraut wrote: > 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

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-04 Thread Robert Haas
On Thu, Aug 4, 2011 at 2:30 PM, Peter Eisentraut wrote: > On ons, 2011-07-27 at 18:08 -0400, Robert Haas wrote: >> Also, while it may be true that we haven't used the term specifically >> in SQL sypnoses, it's been extensively used in other parts of the >> documentation, in the names of system fun

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-04 Thread Peter Eisentraut
On ons, 2011-07-27 at 18:08 -0400, Robert Haas wrote: > Also, while it may be true that we haven't used the term specifically > in SQL sypnoses, it's been extensively used in other parts of the > documentation, in the names of system functions such as > pg_relation_size(), Well, that thing is just

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-08-04 Thread Peter Eisentraut
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 descri

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-28 Thread Kevin Grittner
Robert Haas wrote: > Peter Eisentraut wrote: >> I would like to argue for reverting this. If you want to >> word-smith details like this, "relation" doesn't carry any >> additional meaning. PG hackers know that internally, a >> "relation" is a table, view, index, sequence, etc., but for the >

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-27 Thread Robert Haas
On Wed, Jul 27, 2011 at 5:19 PM, Peter Eisentraut wrote: > I would like to argue for reverting this.  If you want to word-smith > details like this, "relation" doesn't carry any additional meaning.  PG > hackers know that internally, a "relation" is a table, view, index, > sequence, etc., but for

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-27 Thread Josh Kupershmidt
On Wed, Jul 27, 2011 at 5:19 PM, Peter Eisentraut wrote: > On tis, 2011-07-26 at 09:53 -0400, Robert Haas wrote: >> On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt >> wrote: >> > That seems like a good way to document this; patch for master >> updated. >> > I avoided mucking with the documenta

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-27 Thread Peter Eisentraut
On tis, 2011-07-26 at 09:53 -0400, Robert Haas wrote: > On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt > wrote: > > That seems like a good way to document this; patch for master > updated. > > I avoided mucking with the documentation for COMMENT ON RULE and > > COMMENT ON TRIGGER this time; th

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-27 Thread Robert Haas
On Tue, Jul 26, 2011 at 9:21 PM, Josh Kupershmidt wrote: > On Tue, Jul 26, 2011 at 9:53 AM, Robert Haas wrote: >> On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt >> wrote: >> I think this is basically the right approach but I found what you did >> here a bit wordy, so I simplified it, commit

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-26 Thread Josh Kupershmidt
On Tue, Jul 26, 2011 at 9:53 AM, Robert Haas wrote: > On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt wrote: > I think this is basically the right approach but I found what you did > here a bit wordy, so I simplified it, committed it, and back-patched > to 9.0 with suitable adjustment.  Hopefu

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-26 Thread Robert Haas
On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt wrote: > That seems like a good way to document this; patch for master updated. > I avoided mucking with the documentation for COMMENT ON RULE and > COMMENT ON TRIGGER this time; they both say "table" when they really > mean "table or view", but m

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-25 Thread Josh Kupershmidt
On Fri, Jul 22, 2011 at 12:44 PM, Robert Haas wrote: > On Thu, Jul 21, 2011 at 9:17 PM, Josh Kupershmidt wrote: >> Here's a small patch against branch 8.4 to mention support for COMMENT >> ON index_name.column_name. > > I am not in favor of this - because we'd also need to mention every > other r

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-22 Thread Robert Haas
On Thu, Jul 21, 2011 at 9:17 PM, Josh Kupershmidt wrote: > Here's a small patch against branch 8.4 to mention support for COMMENT > ON index_name.column_name. I am not in favor of this - because we'd also need to mention every other relkind that can support comments. I think if we want to do som

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-21 Thread Josh Kupershmidt
On Sun, Jul 17, 2011 at 10:54 AM, Josh Kupershmidt wrote: > On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane wrote: >> After a bit of review of the archives, the somebody was me: >> http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=b7d67954456f15762c04e5269b64adc88dcd0860 >> >> and this

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-17 Thread Josh Kupershmidt
On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane wrote: > After a bit of review of the archives, the somebody was me: > http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=b7d67954456f15762c04e5269b64adc88dcd0860 > > and this thread was the discussion about it: > http://archives.postgresql

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-16 Thread Robert Haas
On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane wrote: > I wrote: >> Josh Kupershmidt writes: >>> What's the Description displayed in that table? > >> What it ought to be is the comment (if any) attached to the index's >> column.  Up through 8.4 this worked as expected, but in 9.0 and up >> somebody s

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-16 Thread Tom Lane
I wrote: > Josh Kupershmidt writes: >> What's the Description displayed in that table? > What it ought to be is the comment (if any) attached to the index's > column. Up through 8.4 this worked as expected, but in 9.0 and up > somebody seems to have disallowed comments on index columns. Not > s

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-16 Thread Tom Lane
Josh Kupershmidt writes: > So, if you look at \d+ newtbl, the right-most column named Description > should display any comments attached to newtbl's columns. You should > see "bcol column comment" as the Description for column bcol. That > works OK. Right. > Now, try this: > test=# \d+ newtbl_i

[HACKERS] psql: bogus descriptions displayed by \d+

2011-07-16 Thread Josh Kupershmidt
Hi all, The psql output for \d+ on indexes, sequences, and views is rather bogus. Examples below from the SQL at bottom. So, if you look at \d+ newtbl, the right-most column named Description should display any comments attached to newtbl's columns. You should see "bcol column comment" as the Des