TABLE not synonymous with SELECT * FROM?
От | Colin 't Hart |
---|---|
Тема | TABLE not synonymous with SELECT * FROM? |
Дата | |
Msg-id | CAMon-aT8Z+5yArRsENrk=L=zSRjKCKHy1g=3KkBYT+h0QPXVDw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: TABLE not synonymous with SELECT * FROM?
|
Список | pgsql-hackers |
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: colin@corundum:~$ psql psql (9.4devel, server 9.3.1) Type "help" for help. eyedb=# table x;a ---1 (1 row) eyedb=# table x limit 10;a ---1 (1 row) eyedb=# table x where a = 1; ERROR: syntax error at or near "where" LINE 1: table x where a = 1; ^ eyedb=# 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. Is the documentation wrong? Or is something broken? Cheers, Colin
В списке pgsql-hackers по дате отправления: