On 14/12/2018 19:44, Robert Haas wrote: > I'm showing up very late to the party here, but I like option 1 best. > I feel like the SQL standard has a pretty clear idea that NULL is how > you represent a value is unknown, which shows up in a lot of places. > Deciding that we're going to use a different sentinel value in this > one case because NULL is a confusing concept in general seems pretty > strange to me.
[The difference between #1 and #4 is whether "any" is represented as NULL or 0.] An example: select pg_stat_statements_reset( 10, (select min(oid) from pg_database where datname like 'test%'), 1234); (This is obviously a weird example, but it illustrates the language-theoretic point.) If you have no matching databases, under #1 this would then apply to all databases. Under #4 it would not. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services