Re: [h2] CTE name resolution wrong (or at least non-standard)

2017-06-30 Thread Noel Grandin



On 2017/06/30 1:05 PM, Thomas Kellerer wrote:

But to be consistent you would need to throw an exception for derived tables as 
well, as they have the same visibility.


good point

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] CTE name resolution wrong (or at least non-standard)

2017-06-30 Thread Thomas Kellerer
But to be consistent you would need to throw an exception for derived 
tables as well, as they have the same visibility. 

However, the following works as expected (given the table definitions from 
my initial post):

select *
from (
  select c3, c4 + 42
  from b
) a;




Am Freitag, 30. Juni 2017 12:58:34 UTC+2 schrieb Noel Grandin:
>
> I'm inclined to take the simple approach and throw an exception if a CTE 
> alias is declared with the same name as an 
> existing table or view. 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] CTE name resolution wrong (or at least non-standard)

2017-06-30 Thread Noel Grandin
I'm inclined to take the simple approach and throw an exception if a CTE alias is declared with the same name as an 
existing table or view.


--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.