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 pete...@gmx.net 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,

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 pete...@gmx.net wrote: On fre, 2011-08-12 at 16:14 -0400, Robert Haas wrote: On Fri, Aug 12, 2011 at 4:11 PM, Peter Eisentraut pete...@gmx.net wrote: A table is either a base table, a derived table, a transient table, or a viewed table.

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

2011-08-13 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

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 mean,

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 pete...@gmx.net 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

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 description for

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 Robert Haas
On Thu, Aug 4, 2011 at 2:30 PM, Peter Eisentraut pete...@gmx.net 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

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 pete...@gmx.net 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

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

2011-08-04 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net 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

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 pete...@gmx.net 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:

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

2011-07-28 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Peter Eisentraut pete...@gmx.net 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,

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 schmi...@gmail.com wrote: On Tue, Jul 26, 2011 at 9:53 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt schmi...@gmail.com wrote: I think this is basically the right approach but I found what you

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 schmi...@gmail.com 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

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 pete...@gmx.net wrote: On tis, 2011-07-26 at 09:53 -0400, Robert Haas wrote: On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt schmi...@gmail.com wrote: That seems like a good way to document this; patch for master updated. I avoided

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 pete...@gmx.net 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.,

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 schmi...@gmail.com 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

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 robertmh...@gmail.com wrote: On Mon, Jul 25, 2011 at 10:29 PM, Josh Kupershmidt schmi...@gmail.com 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

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 robertmh...@gmail.com wrote: On Thu, Jul 21, 2011 at 9:17 PM, Josh Kupershmidt schmi...@gmail.com 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

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 schmi...@gmail.com 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

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 schmi...@gmail.com wrote: On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: After a bit of review of the archives, the somebody was me:

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 t...@sss.pgh.pa.us wrote: After a bit of review of the archives, the somebody was me: http://git.postgresql.org/gitweb/?p=postgresql.gita=commitdiffh=b7d67954456f15762c04e5269b64adc88dcd0860 and this thread was the discussion about it:

[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

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

2011-07-16 Thread Tom Lane
Josh Kupershmidt schmi...@gmail.com 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=#

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

2011-07-16 Thread Tom Lane
I wrote: Josh Kupershmidt schmi...@gmail.com 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

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 t...@sss.pgh.pa.us wrote: I wrote: Josh Kupershmidt schmi...@gmail.com 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