Re: count_nulls(VARIADIC "any")
От | Pavel Stehule |
---|---|
Тема | Re: count_nulls(VARIADIC "any") |
Дата | |
Msg-id | CAFj8pRCH2W=oq-FiwA4-LT_0bB6n9AaVK2QOr+_quLm2UdWJyQ@mail.gmail.com обсуждение исходный текст |
Ответ на | count_nulls(VARIADIC "any") (Marko Tiikkaja <marko@joh.to>) |
Ответы |
Re: count_nulls(VARIADIC "any")
|
Список | pgsql-hackers |
<div dir="ltr">Hi<br /><div class="gmail_extra"><br /><div class="gmail_quote">2015-08-12 19:18 GMT+02:00 Marko Tiikkaja<span dir="ltr"><<a href="mailto:marko@joh.to" target="_blank">marko@joh.to</a>></span>:<br /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br /><br /> I'd like to suggest$SUBJECT for inclusion in Postgres 9.6. I'm sure everyone would've found it useful at some point in their lives,and the fact that it can't be properly implemented in any language other than C I think speaks for the fact that weas a project should provide it.<br /><br /> A quick and dirty proof of concept (patch attached):<br /><br /> =# selectcount_nulls(null::int, null::text, 17, 'bar');<br /> count_nulls<br /> -------------<br /> 2<br /> (1 row)<br/><br /> Its natural habitat would be CHECK constraints, e.g:<br /><br /> CHECK (count_nulls(a,b,c) IN (0, 3))<br/><br /> Will finish this up for the next CF, unless someone wants to tell me how stupid this idea is before that.<spanclass="HOEnZb"><font color="#888888"><br /><br /><br /> .m<br /></font></span></blockquote></div><br /></div><divclass="gmail_extra">I am sending updated version - support num_nulls and num_notnulls<br /><br /></div><div class="gmail_extra">Regards<br/><br /></div><div class="gmail_extra">Pavel<br /></div></div>
В списке pgsql-hackers по дате отправления: