Re: odd behavior/possible bug

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: odd behavior/possible bug
Дата
Msg-id 20030724141617.O4895-100000@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: odd behavior/possible bug  (Joe Conway <mail@joeconway.com>)
Ответы Re: odd behavior/possible bug  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
On Thu, 24 Jul 2003, Joe Conway wrote:

> Tom Lane wrote:
> > Joe Conway <mail@joeconway.com> writes:
> >>So far so good. But look at this one:
> >>regression=# select dwarray(null,null);
> >>ERROR:  cannot determine ANYARRAY/ANYELEMENT type because input is UNKNOWN
> >
> > That seems correct to me.  What would you expect to happen?  There's no
> > type we could assign as the function's actual return type.
>
> I see your point, but mine was that in this case I'd like a NULL
> returned and I don't really care about the type. ISTM that NULL should
> be able to morph into any type it needs to.

I don't think that's necessarily true.
As a potentially absurd example, do we wantselect CAST( CAST( NULL as DATE ) as POINT );
to succeed when dates aren't convertable to points?

The case of func(anyelement, anyelement) returns anyarray could
potentially return some kind of "array of unknown (but single) type"
when presented with unknown inputs.  I'm not sure what use that'd be
unless you are allowed to convert it into something else, though.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: odd behavior/possible bug
Следующее
От: Joe Conway
Дата:
Сообщение: Re: odd behavior/possible bug