[Info-ingres] Question on min() and nullability

Martin Bowes martin.bowes at ndph.ox.ac.uk
Thu Oct 29 13:08:45 UTC 2020


Hi All,

This doesn't seem right to me...
declare global temporary table session.test(
    a ingresdate not null not default
) on commit preserve rows with norecovery;

insert into session.test values ('1-jan-2020'), ('1-jan-2019'), ('1-jan-2018');

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?

Martin Bowes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20201029/e167dd4b/attachment.html>


More information about the Info-ingres mailing list