Re: ORDER BY TABLENAME, possible bug
От | Tom Lane |
---|---|
Тема | Re: ORDER BY TABLENAME, possible bug |
Дата | |
Msg-id | 9267.1479512010@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: ORDER BY TABLENAME, possible bug ("David G. Johnston" <david.g.johnston@gmail.com>) |
Список | pgsql-bugs |
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Fri, Nov 18, 2016 at 3:35 PM, Pantelis Theodosiou <ypercube@gmail.com> > wrote: >> Is this somewhere in the documentation? > âhttps://www.postgresql.org/docs/9.6/static/rowtypes.html > â"Whenever you create a table, a composite type is also automatically > created, with the same name as the table, to represent the table's row > type." > So, its documented and in technically correct location. I'm not sure if > introducing this material in a "tutorial" would be a gain or just confuse > the student. It seems to be something one picks up somehow (trial and > error, mailing list, stumbling upon it in the docs or elsewhere on the > Internet) as one increases their knowledge of SQL to an intermediate level. There's a whole bunch of behaviors around composite values that are documented in scattered places, some of which are completely not where you'd expect to look. In this example, the fact that you can use a table name/alias to represent the composite value of the current row is something that isn't exactly obvious, much less how that relates to other possible spellings such as "TABLENAME.*". We had a related question just a couple weeks ago, which caused me to wonder (not for the first time) whether we could pull together some sort of unified presentation. I haven't done anything about it though. regards, tom lane
В списке pgsql-bugs по дате отправления: