Re: count_nulls(VARIADIC "any")

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: count_nulls(VARIADIC "any")
Дата
Msg-id 565224B1.60901@joh.to
обсуждение исходный текст
Ответ на Re: count_nulls(VARIADIC "any")  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
On 2015-11-22 21:17, Jim Nasby wrote:
> On 11/22/15 11:34 AM, Marko Tiikkaja wrote:
>> On 2015-11-22 18:29, Jim Nasby wrote:
>>> Only if you know how many columns there already are.
>>>
>>> Or does this not work if you hand it a row?
>>
>> It "works" in the sense that it tells you whether the row is NULL or
>> not.  I.e. the answer will always be 0 or 1.
>
> Hrm, I was hoping something like count_nulls(complex_type.*) would work.

Nope:

=# select num_nulls((f).*) from (select '(1,2,3)'::foo) ss(f);
ERROR:  row expansion via "*" is not supported here


.m



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: custom function for converting human readable sizes to bytes
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: custom function for converting human readable sizes to bytes