-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
63271: sql: wrap typed Array within IndirectionExpr in ParenExpr r=ajwerner,rafiss a=the-ericwang35 This patch adds a case that #63103 missed. When we have something like `ARRAY['a'::typ, 'b'::typ]`, we format it to `ARRAY['a'::typ, 'b'::typ]:::public.typ[]`. This causes issues if used in an `IndirectionExpr`, such as `ARRAY['a'::typ, 'b'::typ]:::public.typ[][1]`, as the `[1]` is interpreted as part of the type. This would result in errors when trying to use these expressions in default expressions. This patch checks for this specific case, and instead formats it as `(ARRAY['a'::typ, 'b'::typ]:::public.typ[])[1]`. Release note: None Co-authored-by: Eric Wang <[email protected]>
- Loading branch information
Showing
4 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters