1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Allow to omit boundaries in array subscript

Allow to omiy lower or upper or both boundaries in array subscript
for selecting slice of array.

Author: YUriy Zhuravlev
This commit is contained in:
Teodor Sigaev
2015-12-18 15:18:58 +03:00
parent 33bd250f6c
commit 9246af6799
12 changed files with 184 additions and 28 deletions

View File

@ -650,7 +650,7 @@ transformAssignmentIndirection(ParseState *pstate,
if (IsA(n, A_Indices))
{
subscripts = lappend(subscripts, n);
if (((A_Indices *) n)->lidx != NULL)
if (((A_Indices *) n)->lidx != NULL || ((A_Indices *) n)->lidx_default)
isSlice = true;
}
else if (IsA(n, A_Star))