Re: Fw: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Conway <joseph(dot)conway(at)home(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fw: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards
Date: 2001-06-25 23:04:22
Message-ID: 200106252304.f5PN4Me04785@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Patch applied by Tom Lane with some small mods.

> (Sorry if you receive this twice, but I sent it Saturday evening and it
> never made it to the list)
>
> Thanks for your thorough review and comments, Tom.
>
> Here's a new patch for review. Summary of changes/response to earlier
> comments:
> - add a routine for NullTest nodes -- done.
> - declare selectivity functions without fmgr notation -- done.
> - create selfuncs.h for declarations -- done, but I didn't move anything
> else out of builtins.h
> - use DatumGetBool() and adjust style -- done
> - create better default selectivities -- done:
> - DEFAULT_UNK_SEL = 0.005
> - DEFAULT_NOT_UNK_SEL = 1 - DEFAULT_UNK_SEL
> - DEFAULT_BOOL_SEL = 0.5
> - recurse clause_selectivity() for non-Var input -- done
> - simplify MCV logic -- done, used 2nd approach (always use the first most
> common val's frequency)
>
> Questions:
> - I added a debug define (BOOLTESTDEBUG) to selfuncs.h, and a corresponding
> ifdef/elog NOTICE to clause_selectivity(). This was to help me debug/verify
> the calculations. Should this be left in the code when I create a patch (it
> is in this one), and if so, is there a preferred "standard" approach to this
> type of debug code?
> - Using the debug code mentioned above, I noted that clause_selectivity()
> did not seem to get called at all for clauses like "where myfield = 0" or
> "where myfield > 0". I haven't looked too closely at it yet, but I was
> wondering if this is expected behavior?
>
> Thanks,
>
> -- Joe
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Grant 2001-06-26 01:47:24 Announcing Postgresql backup script.
Previous Message Barry Lind 2001-06-25 22:49:51 Re: [HACKERS] Instrumenting and Logging in JDBC