Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2014-03-07 Thread Bruce Momjian
On Wed, Nov 13, 2013 at 10:28:07AM +0100, Colin 't Hart wrote: > David et al, > > How about something like this? I have applied a modified version of your patch. I didn't like the idea of putting "SELECT" inside an OR syntax clauses --- the syntax is already too complicated. I also didn't like

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-13 Thread Colin 't Hart
David et al, How about something like this? Cheers, Colin diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index e603b76..a68014b 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -33,13 +33,14 @@ PostgreSQL documentation [ WITH [ RECUR

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-12 Thread cthart
David Johnston wrote > The paragraph is unnecessary if the Synopsis section of the SELECT > documentation is updated to correctly reflect all the valid clauses that > can be attached to TABLE. The current reading implies that you cannot > attach anything so when you said LIMIT worked I was surpris

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread David Johnston
Colin 't Hart wrote > Methinks we should fix the documentation, something like: > > The command > > TABLE name > > is equivalent to > > SELECT * FROM name > > It can be used as a top-level command or as a space-saving syntax > variant in parts of complex queries. Only the WITH, ORDER BY, LIMIT

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread Colin 't Hart
On 11 November 2013 15:03, Tom Lane wrote: > "Colin 't Hart" writes: >> I would've thought it was implemented as a shortcut for "SELECT * >> FROM" at the parse level (ie encounter "TABLE" and insert "SELECT * >> FROM" into the parse tree and continue), but it seems there is more to >> it. > > If

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > I would've thought it was implemented as a shortcut for "SELECT * > FROM" at the parse level (ie encounter "TABLE" and insert "SELECT * > FROM" into the parse tree and continue), but it seems there is more to > it. If you look at the PG grammar you'll see that "TABLE rel

[HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread Colin 't Hart
Hi, According to http://www.postgresql.org/docs/9.3/static/sql-select.html#SQL-TABLE " The command TABLE name is completely equivalent to SELECT * FROM name It can be used as a top-level command or as a space-saving syntax variant in parts of complex queries. " However, this isn't true: