Subject | Re: [firebird-support] Question: RDB$SYSTEM_FLAG = 0 No Results |
---|---|
Author | |
Post date | 2019-02-27T18:27:14Z |
Robert Tulloch wrote,
something like that? And several other Delphi GUI tools at that time,
because most Delphi components couldn't represent NULL.
And don't forget that everything in the IB6 distribution was Beta.
IB6 was never released.
You'd get proper results if you used isql and ran the right query.
Your query
select cast (RDB$RELATION_NAME as varchar(32)) AS TABLE_NAME,
cast (RDB$INDEX_NAME as varchar(32)) AS INDEX_NAME,
RDB$STATISTICS
from rdb$indices
where 0 = 0 AND RDB$SYSTEM_FLAG = 1
order by RDB$STATISTICS DESC
will produce *only* rows where RDB$SYSTEM_FLAG = 1
This one (with mods to make it sensible):
select RDB$RELATION_NAME,
RDB$INDEX_NAMEE,
RDB$STATISTICS
from rdb$indices
where RDB$SYSTEM_FLAG = 0
order by 3 DESC
produces *only* rows where RDB$SYSTEM_FLAG = 0
which means no rows at all, because at that stage nobody had done the
required bug-fixing and cleanup of the IB6 code.
This one:
select RDB$RELATION_NAME,
RDB$INDEX_NAMEE,
RDB$STATISTICS
from rdb$indices
where RDB$SYSTEM_FLAG is null
or RDB$SYSTEM_FLAG = 0
order by 3 DESC
produces the rows for the user-defined indices.
you. Run the same queries in isql and see for yourself.
HB
>[Mark Rotteveel]Such as the GUI tool that was distributed with IB6 - ibadmin, or
> 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.
something like that? And several other Delphi GUI tools at that time,
because most Delphi components couldn't represent NULL.
And don't forget that everything in the IB6 distribution was Beta.
IB6 was never released.
You'd get proper results if you used isql and ran the right query.
Your query
select cast (RDB$RELATION_NAME as varchar(32)) AS TABLE_NAME,
cast (RDB$INDEX_NAME as varchar(32)) AS INDEX_NAME,
RDB$STATISTICS
from rdb$indices
where 0 = 0 AND RDB$SYSTEM_FLAG = 1
order by RDB$STATISTICS DESC
will produce *only* rows where RDB$SYSTEM_FLAG = 1
This one (with mods to make it sensible):
select RDB$RELATION_NAME,
RDB$INDEX_NAMEE,
RDB$STATISTICS
from rdb$indices
where RDB$SYSTEM_FLAG = 0
order by 3 DESC
produces *only* rows where RDB$SYSTEM_FLAG = 0
which means no rows at all, because at that stage nobody had done the
required bug-fixing and cleanup of the IB6 code.
This one:
select RDB$RELATION_NAME,
RDB$INDEX_NAMEE,
RDB$STATISTICS
from rdb$indices
where RDB$SYSTEM_FLAG is null
or RDB$SYSTEM_FLAG = 0
order by 3 DESC
produces the rows for the user-defined indices.
>Can I send you a screenshot of the flags in RDB$RELATIONS?No point - it would only serve to illustrate what Mark already told
you. Run the same queries in isql and see for yourself.
HB