I wasn't sure if general syntax criticism should be applied here. But since 
you suggested brackets, I'd like to counter-act and remind this group of 
the SQL standard. As of SQL:2008, the standard specifies the following two:

*6.36 <array value constructor>*

<array value constructor> ::=
    <array value constructor by enumeration>
  | <array value constructor by query> 

 

<array value constructor by enumeration> ::=
  ARRAY <left bracket or trigraph> <array element list> <right bracket or 
trigraph>

 

<array value constructor by query> ::=

  ARRAY <left paren> <query expression> [ <order by clause> ] <right paren>


Whereas...

*7.1 <row value constructor>*

<row value constructor> ::=
    <common value expression>
  | <boolean value expression>
  | <explicit row value constructor>

 

<explicit row value constructor> ::=
    <left paren> <row value constructor element> <comma>
      <row value constructor element list> <right paren>
  | ROW <left paren> <row value constructor element list> <right paren>
  | <row subquery>


Hence, according to the standard, arrays *must *be expressed using the 
ARRAY constructor, whereas tuples/rows *may *be expressed using the ROW 
constructor, or just using a constructor-less, parenthesis-delimited 
argument list.

Following suit with the standard would probably impose a major 
(incompatible) change in H2, hence evaluating this carefully is important. 
Personally, I think letting the non-standard H2 ARRAY syntax live is a 
viable option, as long as it doesn't contradict the common understanding of 
what a tuple is and how it behaves in SQL...

Am Samstag, 1. September 2012 09:41:54 UTC+2 schrieb Rami Ojares:
>
> Another would be to use [ ... ] as array constructor and ( ... ) as 
> tuple constructor. 
> That would be more in line with widespread conventions. 
> Just a thought. 
>
> - rami 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/vvnIiZzsIcQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to