Subject Re: [firebird-support] Question: RDB$SYSTEM_FLAG = 0 No Results
Author Mark Rotteveel
On 2019-02-26 18:48, Robert Tulloch tultalk@...
[firebird-support] wrote:
>> I don't have InterBase 6, but I tried on Firebird 1.5, and I have
>> to use
>> `RDB$SYSTEM_FLAG IS NULL` for your query to return non-system
>> indexes,
>> and that is because the flag is 1 for system, and null for
>> non-system on
>> that version, and as far as I know that was inherited from InterBase
>> 6.
> Hi:
>
> That worked. I do not understand since the flag is 0 and not null.

No, the flag is null, not 0, otherwise = 0 had worked, and is null had
not. You appear to be using a query tool that renders null as 0.

> This does not set well with me. Raises questions.
>
> Best regards. You say this was "fixed".
>
> So in later version 0 works but does null also work?

No, 0 is not null. With Firebird 1.5 and later, you can use
COALESCE(RDB$SYSTEM_FLAG, 0) = 0 as a workaround, but COALESCE doesn't
exist in InterBase 6.

Mark