[Info-ingres] Question on min() and nullability
Adrian Williamson
adrian.williamson at rationalcommerce.com
Thu Oct 29 13:52:59 UTC 2020
I was more curious about WTF ii_dv_desc was all about:
But I then found this:
http://www.databaseteam.org/10-database/7ae0587cf0276f06.htm
-----Original Message-----
From: info-ingres-bounces at lists.planetingres.org <info-ingres-bounces at lists.planetingres.org> On Behalf Of Martin Bowes
Sent: 29 October 2020 13:14
To: Karl Schendel <schendel at kbcomputer.com>
Cc: info-ingres at lists.planetingres.org
Subject: Re: [Info-ingres] Question on min() and nullability
Of course, thanks Karl.
-----Original Message-----
From: Karl Schendel < <mailto:schendel at kbcomputer.com> schendel at kbcomputer.com>
Sent: 29 October 2020 13:11
To: Martin Bowes < <mailto:martin.bowes at ndph.ox.ac.uk> martin.bowes at ndph.ox.ac.uk>
Cc: <mailto:info-ingres at lists.planetingres.org> info-ingres at lists.planetingres.org
Subject: Re: [Info-ingres] Question on min() and nullability
> On Oct 29, 2020, at 9:08 AM, Martin Bowes < <mailto:martin.bowes at ndph.ox.ac.uk> martin.bowes at ndph.ox.ac.uk> wrote:
>
> select ii_dv_desc(min(a)) from session.test Executing . . .
>
>
> ┌──────────────────────────────────────────────────────────────┐
> │col1 │
> ├──────────────────────────────────────────────────────────────┤
> │nullable ingresdate │
> └──────────────────────────────────────────────────────────────┘
> (1 row)
>
> How can the min of a non nullable field ever itself be a null?
>
Because it's an aggregate. min can be null if there are no rows.
Karl
_______________________________________________
Info-ingres mailing list
<mailto:Info-ingres at lists.planetingres.org> Info-ingres at lists.planetingres.org
<https://lists.planetingres.org/mailman/listinfo/info-ingres> https://lists.planetingres.org/mailman/listinfo/info-ingres
_______________________________________________
Info-ingres mailing list
<mailto:Info-ingres at lists.planetingres.org> Info-ingres at lists.planetingres.org
<https://lists.planetingres.org/mailman/listinfo/info-ingres> https://lists.planetingres.org/mailman/listinfo/info-ingres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20201029/7c1c7fcc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 83134 bytes
Desc: not available
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20201029/7c1c7fcc/attachment.png>
More information about the Info-ingres
mailing list