Re: Example for unnest(anyarray, anyarray) fails
"David G. Johnston" <[email protected]> Wed, 11 Dec 2019 15:55:01 -0700
| Newsgroups | gmane.comp.db.postgresql.devel.documentation |
|---|---|
| Message-ID | <CAKFQuwZZ1vD_fWZqERLkkaC_qGH-X7ijakr0vYLnPWVjqY3wJw@mail.gmail.com> |
--000000000000c1af2905997585d7 Content-Type: text/plain; charset="UTF-8" On Wed, Dec 11, 2019 at 3:21 PM PG Doc comments form <[email protected]> wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/9.6/functions-array.html > Description: > > [...] > ghowe=# select unnest(ARRAY[1,2],ARRAY['foo','bar','baz']); > ERROR: function unnest(integer[], text[]) does not exist > LINE 1: select unnest(ARRAY[1,2],ARRAY['foo','bar','baz']) > ^ > HINT: No function matches the given name and argument types. You might > need > to add explicit type casts. > As your query doesn't place the unnest function in the FROM clause as the documentation says is required it is to be expected that your query fails. The subsequent part of that sentence links you over to the section of the documentation that provides a full example. The one in the table is intended as a quick-reference. David J. --000000000000c1af2905997585d7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:arial,helvetica,sans-serif"><span style=3D"font-family:Arial,Helve= tica,sans-serif">On Wed, Dec 11, 2019 at 3:21 PM PG Doc comments form <<= a href=3D"mailto:[email protected]">[email protected]</a>> wro= te:</span><br></div></div><div class=3D"gmail_quote"><blockquote class=3D"g= mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204= ,204,204);padding-left:1ex">The following documentation comment has been lo= gged on the website:<br> <br> Page: <a href=3D"https://www.postgresql.org/docs/9.6/functions-array.html" = rel=3D"noreferrer" target=3D"_blank">https://www.postgresql.org/docs/9.6/fu= nctions-array.html</a><br> Description:<br><br></blockquote><div><span class=3D"gmail_default" style= =3D"font-family:arial,helvetica,sans-serif">[...]</span>=C2=A0</div><blockq= uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p= x solid rgb(204,204,204);padding-left:1ex"> ghowe=3D# select unnest(ARRAY[1,2],ARRAY['foo','bar','b= az']);<br> ERROR:=C2=A0 function unnest(integer[], text[]) does not exist<br> LINE 1: select unnest(ARRAY[1,2],ARRAY['foo','bar','baz= '])<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br> HINT:=C2=A0 No function matches the given name and argument types. You migh= t need<br> to add explicit type casts.<br></blockquote><div><br></div><div class=3D"gm= ail_default" style=3D"font-family:arial,helvetica,sans-serif">As your query= doesn't place the unnest function in the FROM clause as the documentat= ion says is required it is to be expected that your query fails.=C2=A0 The = subsequent part of that sentence links you over to the section of the docum= entation that provides a full example.=C2=A0 The one in the table is intend= ed as a quick-reference.</div><div class=3D"gmail_default" style=3D"font-fa= mily:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_default" sty= le=3D"font-family:arial,helvetica,sans-serif">David J.</div><div class=3D"g= mail_default" style=3D"font-family:arial,helvetica,sans-serif"></div></div>= </div> --000000000000c1af2905997585d7--