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

Поиск
Список
Период
Сортировка
От Hiroshi Saito
Тема "AS" by the syntax of table reference.(8.4 proposal)
Дата
Msg-id 02ec01c86a76$df952d80$0301a8c0@HP22720319231
обсуждение исходный текст
Ответы Re: "AS" by the syntax of table reference.(8.4 proposal)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all.

I thinks to the option of "AS" by the syntax of table reference.
The problem on structure had restricted it until now. Then, 
conversion was required of this by the degree of migration from 
other DBMS's. It was irritated a little.
I understood that it was an option in SQL2003 and SQL99. 

--
<SQL2003>  7.6 <table reference> (p303)  <table or query name> [ [ AS ] <correlation name>
--

I propose this. However, postfix operators is troublesome.
Therefore, This is the inclusion with restriction. 
I think that it is a trifling problem. But, The past compatibility 
is worried very much. Then, many developers' clear eye is required
for it. However, I need this patch very much. 


<about regression error of the after patch>
This is as a result of after patch apply of CVS-HEAD regression.
The cause changed the error position of a grammar interpretation.

--   plpgsql              ... FAILED

========================1 of 114 tests failed. 
========================

*** ./expected/plpgsql.out      Wed Jul 25 13:19:09 2007
--- ./results/plpgsql.out       Fri Jan 25 14:29:34 2008
***************
*** 2337,2343 ****     end loop;     return 5; end;$$ language plpgsql;
! ERROR:  syntax error at or near "fought" LINE 1:  select I fought the law, the law won                   ^ QUERY:
selectI fought the law, the law won
 
--- 2337,2343 ----     end loop;     return 5; end;$$ language plpgsql;
! ERROR:  syntax error at or near "the" LINE 1:  select I fought the law, the law won                          ^ QUERY:
 select I fought the law, the law won
 

======================================================================


<about postfix operator problem>
There is syntax which is not passed. However, It is necessary to make 
it c_expr expression. Probably, it is avoided by cautions of a document. 

--
regression=# SELECT aa AS "X" FROM a_star LIMIT 1;X
---1
(1 row)

regression=# SELECT aa ! AS "X" FROM a_star LIMIT 1;X
---1
(1 row)

regression=# SELECT aa ! "X" FROM a_star LIMIT 1;
ERROR:  column "X" does not exist
LINE 1: SELECT aa ! "X" FROM a_star LIMIT 1;                   ^
regression=# SELECT (aa !) "X" FROM a_star LIMIT 1;X
---1
(1 row)
--

BTW, this is the syntax which ORACLE and SQLServer don't accept. 
It may be the wonderfulness of PostgreSQL. However, Is there any 
situation using the function? But, I can't do assertion.

In conclusion, Therefore, this will be left to vote.

Regards,
Hiroshi Saito

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

Предыдущее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: The question of LOCALE at the time of a regression test.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: The question of LOCALE at the time of a regression test.