Re: "AS" by the syntax of table reference.(8.4 proposal)

Поиск
Список
Период
Сортировка
От Hiroshi Saito
Тема Re: "AS" by the syntax of table reference.(8.4 proposal)
Дата
Msg-id 055b01c86ab6$53781570$0301a8c0@HP22720319231
обсуждение исходный текст
Ответ на "AS" by the syntax of table reference.(8.4 proposal)  ("Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>)
Ответы Re: "AS" by the syntax of table reference.(8.4 proposal)
Список pgsql-hackers
Sorry, I'm sleeping. 

Thanks Gregory-san. and, Tom-san.

> Gregory Stark <stark@enterprisedb.com> writes:
>> But yeah, c_expr isn't enough. We really need {a,b}_expr sans postfix
>> expressions.
> 
> How's that going to help?  As long as postfix operators exist at all,
> 
> SELECT a + b, ...
> 
> is going to be ambiguous, and no amount of grammar magic changes that.
> We could force the parser into using one interpretation or the other,
> but it would still be wrong for some folks.

Ah yes, {a,b}_expr is very difficult.....Then, I am asking for compromise. 

at the "c_expr", case after the patch..
postgres=# select a+b from n;?column?
----------       5
(1 row)

postgres=# select a+b AS "FIELD" from n;FIELD
-------    5
(1 row)

postgres=# select a+b  "FIELD" from n;
ERROR:  syntax error at or near ""FIELD""
LINE 1: select a+b  "FIELD" from n;                   ^
postgres=# select (a+b)  "FIELD" from n;FIELD
-------    5
(1 row)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: "AS" by the syntax of table reference.(8.4 proposal)
Следующее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: "AS" by the syntax of table reference.(8.4 proposal)