mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Allow omitting one or both boundaries in an array slice specifier.
Omitted boundaries represent the upper or lower limit of the corresponding
array subscript. This allows simpler specification of many common
use-cases.
(Revised version of commit 9246af6799
)
YUriy Zhuravlev
This commit is contained in:
@ -9372,10 +9372,12 @@ printSubscripts(ArrayRef *aref, deparse_context *context)
|
||||
appendStringInfoChar(buf, '[');
|
||||
if (lowlist_item)
|
||||
{
|
||||
/* If subexpression is NULL, get_rule_expr prints nothing */
|
||||
get_rule_expr((Node *) lfirst(lowlist_item), context, false);
|
||||
appendStringInfoChar(buf, ':');
|
||||
lowlist_item = lnext(lowlist_item);
|
||||
}
|
||||
/* If subexpression is NULL, get_rule_expr prints nothing */
|
||||
get_rule_expr((Node *) lfirst(uplist_item), context, false);
|
||||
appendStringInfoChar(buf, ']');
|
||||
}
|
||||
|
Reference in New Issue
Block a user