public inbox for [email protected]  
help / color / mirror / Atom feed
Example for unnest(anyarray, anyarray) fails
2+ messages / 2 participants
[nested] [flat]

* Example for unnest(anyarray, anyarray) fails
@ 2019-12-11 21:04  PG Doc comments form <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2019-12-11 21:04 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/functions-array.html
Description:

~ $ psql
psql (11.2, server 9.6.14)
Type "help" for help.

ghowe=# select version();
                                                    version                 
                                  
---------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.6.14 on x86_64-apple-darwin14.5.0, compiled by Apple LLVM
version 7.0.0 (clang-700.1.76), 64-bit
(1 row)

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.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Example for unnest(anyarray, anyarray) fails
@ 2019-12-11 22:55  David G. Johnston <[email protected]>
  parent: PG Doc comments form <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2019-12-11 22:55 UTC (permalink / raw)
  To: Guyren Howe <[email protected]>; [email protected]

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.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-12-11 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 21:04 Example for unnest(anyarray, anyarray) fails PG Doc comments form <[email protected]>
2019-12-11 22:55 ` David G. Johnston <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox