BUG #11825: "select lead('literal text') ..." -> could not determine polymorphic type - Mailing list pgsql-bugs

From casey@cloudera.com
Subject BUG #11825: "select lead('literal text') ..." -> could not determine polymorphic type
Date
Msg-id 20141029214531.6149.49378@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11825
Logged by:          casey
Email address:      casey@cloudera.com
PostgreSQL version: 9.3.5
Operating system:   ubuntu 14.04
Description:

Some analytic functions such as LEAD/FIRST_VALUE don't accept char literals
as input, an example is below. This came up randomly during some testing. I
don't have a good use case for such a query and it's easy to workaround but
it seems odd so I thought I'd report it.

functional=# select version();
                                               version

------------------------------------------------------------------------------------------------------
 PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu
4.8.2-19ubuntu1) 4.8.2, 64-bit
(1 row)

functional=# create table empty (c int);
CREATE TABLE
functional=# SELECT LEAD('a') OVER () FROM empty;
ERROR:  could not determine polymorphic type because input has type
"unknown"

pgsql-bugs by date:

Previous
From: skeefe@rdx.com
Date:
Subject: BUG #11824: Postgres Restoring the same file multiple times
Next
From: jeff.janes@gmail.com
Date:
Subject: BUG #11829: pgcrypto doc bug