You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the lower bound index value of an array's dimensions is set to one. To represent arrays with other lower bounds, the array subscript ranges can be specified explicitly before writing the array contents. This decoration consists of square brackets ([]) around each array dimension's lower and upper bounds, with a colon (:) delimiter character in between. The array dimension decoration is followed by an equal sign (=). For example:
# SELECT VERSION();
version
---------------------------------------------------------------------------------------
PostgreSQL 15.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.2.1 20230211, 64-bit
# CREATE TABLE test(data double precision[]);
# INSERT INTO test(data) VALUES ('{1,2,3,4,5}');
# SELECT * FROM test;
data
-------------
{1,2,3,4,5}
(1 row)
# UPDATE test SET data[0] = 0;
UPDATE 1
# SELECT * FROM test;
data
---------------------
[0:5]={0,1,2,3,4,5}
(1 row)
Cannot handle the literal [0:5]={0,1,2,3,4,5}
Crashes with pq: unable to parse array; expected '{' at offset 0 because the first character returned is [ instead of the expected {
The text was updated successfully, but these errors were encountered:
From: https://www.postgresql.org/docs/current/arrays.html#ARRAYS-IO
Cannot handle the literal
[0:5]={0,1,2,3,4,5}
Crashes with
pq: unable to parse array; expected '{' at offset 0
because the first character returned is[
instead of the expected{
The text was updated successfully, but these errors were encountered: