On 03/26/13 08:53, Dmitry Yemanov wrote:
> 26.03.2013 7:42, Dmitry Yemanov wrote:
>
>> This was an intended change which probably became an overkill. I will
>> report back after closer investigation.
> Sorry, I thought that your issue was caused by the i.RDB$RELATION_NAME =
> rf.RDB$RELATION_NAME condition, but it's not. So there's only one error
> and it's explained in my prior message. No bugs here, everything is as
> designed. The query should be rewritten as:
>
> select
>     rf.RDB$RELATION_NAME,
>     rf.RDB$FIELD_NAME,
>     s.RDB$INDEX_NAME
> from RDB$RELATION_FIELDS rf
> left join (
>     RDB$INDICES i
>     join RDB$INDEX_SEGMENTS s
>       on i.RDB$INDEX_NAME = s.RDB$INDEX_NAME
>     join RDB$RELATION_CONSTRAINTS rc
>       on rc.RDB$INDEX_NAME = s.RDB$INDEX_NAME
>         and rc.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY'
>     ) on i.RDB$RELATION_NAME = rf.RDB$RELATION_NAME
>       and s.RDB$FIELD_NAME = rf.RDB$FIELD_NAME
> where
>     rf.RDB$FIELD_SOURCE starting with 'D_FK_'

Dmirty, what do you think - will the users be happy to rewrite lots of 
SQL operators to match this restriction?


------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to