Re: AssertArg failure in src/backend/executor/functions.c:check_sql_fn_retval()

From: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: AssertArg failure in src/backend/executor/functions.c:check_sql_fn_retval()
Date: 2016-03-27 19:20:06
Message-ID: BLU436-SMTP104ED623DA67C75CA6D873CF2850@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-03-27 16:40, Tom Lane wrote:
> Hm. I would argue that it should have rejected CAST(NULL AS ANYARRAY).
> That's a pseudotype and so there should never be an actual value of that
> type, not even a null value.

I'm a little confused about what you mean here. I thought reject was
exactly what's happening; normally you'd get "ERROR: return type
anyarray is not supported for SQL functions".

If you mean specifically to forbid CAST(NULL AS ANYARRAY) in general
then I'd like to point out that there are columns of type anyarray, at
least pg_catalog.pg_statistic.stavalues1 is, so the cast is not the only
way to trigger this.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-03-27 20:25:33 Re: Relation extension scalability
Previous Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2016-03-27 17:58:12 Re: [PATCH] Alter or rename enum value