From: Bryn Llewellyn <bryn@yugabyte.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Where's the doc for "array()" — as in "select array(values (17), (42))"
Date: Mon, 19 Sep 2022 09:23:57 -0700
Message-ID: <65C0EEAA-73D9-455E-AECD-F188AD5AF973@yugabyte.com> (raw)
In-Reply-To: <320057f4-f55a-2532-2d68-51253b5bbfbc@aklaver.com>
References: <F2DA0774-0B4D-4E72-8944-116154A57D98@yugabyte.com>
<e6ac86e5-39f4-9704-7260-3f6c40c63b2d@aklaver.com>
<C167E3BD-B650-4A8E-80A3-3307E70883C0@yugabyte.com>
<320057f4-f55a-2532-2d68-51253b5bbfbc@aklaver.com>
> adrian.klaver@aklaver.com wrote:
>
> bryn@yugabyte.com wrote:
>
>> Thanks. I can't, even now, formulate a search that finds this—unless I know that it's a kind of array constructor. (I'll concede, with the benefit of hindsight, that I should have thought of that.) I hope that I'll be able to learn to navigate the PG docs better over time.
>
> The way I found it:
>
> 1) Use documentation search box.
>
> 2) Enter array(
>
> 3) It was in the fifth item PostgreSQL: Documentation: 14: 4.2. Value Expressions. The first four dealt with functions or the index and I knew they where not relevant.
I just repeated exactly those five search steps. I copied the first ten results at the end. Yes, the fifth hit is the link to where the account of the array() constructor is found. But you can't tell this from the hitlist itself. And searching in the page of the first twenty hits for "array(" finds nothing there. I do see that if you know the answer in advance, then you could realize that hit #5 is what you want. But the wording "a specific element of the array value can be extracted" didn't help me.
Never mind, I trust that I'll remember where to look now.
--------------------------------------------------------------------------------
Result pages: 1 2 3 4 5 6 7 8 9 Next
1. PostgreSQL: Documentation: 14: 8.15. Arrays [8.21]
...Arrays Prev Up Chapter 8. Data Types Home Next 8.15. Arrays 8.15.1. Declaration of Array...
https://www.postgresql.org/docs/14/arrays.html
2. PostgreSQL: Documentation: 14: 9.19. Array Functions and Operators [5.04]
...Array Functions and Operators Prev Up Chapter 9. Functions and Operators Home Next 9.19. Array...
https://www.postgresql.org/docs/14/functions-array.html
3. PostgreSQL: Documentation: 14: 9.16. JSON Functions and Operators [4.25]
...array (array elements are indexed from zero, but negative integers count from the end). '[{"a":"foo"},{"b":"bar"},{"c":"baz"}]'::json...
https://www.postgresql.org/docs/14/functions-json.html
4. PostgreSQL: Documentation: 14: Index [2.63]
...array, Arrays accessing, Accessing Arrays constant, Array Value Input constructor, Array Constructors declaration, Declaration of Array...
https://www.postgresql.org/docs/14/bookindex.html
5. PostgreSQL: Documentation: 14: 4.2. Value Expressions [2.27]
...array type, then a specific element of the array value can be extracted by writing...
https://www.postgresql.org/docs/14/sql-expressions.html
6. PostgreSQL: Documentation: 14: 8.14. JSON Types [1.76]
...array on the right side is not considered contained within the -- array on the left...
https://www.postgresql.org/docs/14/datatype-json.html
7. PostgreSQL: Documentation: 14: 66.3. Extensibility [1.33]
...array of operators and comparison values */ ScanKey orderbys; /* array of ordering operators and comparison * values...
https://www.postgresql.org/docs/14/spgist-extensibility.html
8. PostgreSQL: Documentation: 14: F.18. intarray [1.33]
...arrays. Although they will accept input arrays of more dimensions, the data is treated as though...
https://www.postgresql.org/docs/14/intarray.html
9. PostgreSQL: Documentation: 14: CREATE TYPE [1.33]
...array type; for example, it will not be a candidate for the result type of ARRAY...
https://www.postgresql.org/docs/14/sql-createtype.html
10. PostgreSQL: Documentation: 14: 9.24. Row and Array Comparisons [1.15]
...Array Comparisons Prev Up Chapter 9. Functions and Operators Home Next 9.24. Row and Array...
https://www.postgresql.org/docs/14/functions-comparisons.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bryn@yugabyte.com, adrian.klaver@aklaver.com
Subject: Re: Where's the doc for "array()" — as in "select array(values (17), (42))"
In-Reply-To: <65C0EEAA-73D9-455E-AECD-F188AD5AF973@yugabyte.com>
References: <F2DA0774-0B4D-4E72-8944-116154A57D98@yugabyte.com> <e6ac86e5-39f4-9704-7260-3f6c40c63b2d@aklaver.com> <C167E3BD-B650-4A8E-80A3-3307E70883C0@yugabyte.com> <320057f4-f55a-2532-2d68-51253b5bbfbc@aklaver.com> <65C0EEAA-73D9-455E-AECD-F188AD5AF973@yugabyte.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox