Search Postgresql Archives

Re: Is _<typename> a supported way to create a column of array type?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom,

I think I understand now.

Postgres type system does not distinguish between array types with different
number of dimensions. int[], int[][] and int[][][][][][] are all equivalent to the type system.

Number of dimensions is part of the value though and execution takes care of it.
If I subscript an array with wrong "number of brackets" (as in
`select (array[1,2,3])[1][1][1]`) I get NULL. 

Presto type system however distinguishes array(integer), array(array(integer))...
(using Presto therms). And execution is (expectedly) not as flexible.

We can inspect number of brackets that were written in the table creation
command but that's inferring (and enforcing) strong typing for something that is
not strongly typed. Thus, we can fail at execution.

Do you have any plans to support arrays with different number of dimensions
in the type system?

Best,
Piotr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux