Provide name of ambigous field name when creating procedure
-----------------------------------------------------------

                 Key: CORE-5670
                 URL: http://tracker.firebirdsql.org/browse/CORE-5670
             Project: Firebird Core
          Issue Type: Improvement
          Components: Engine
            Reporter: Karol Bieniaszewski


When we run query with ambigous field name e.g.

SELECT 1 FROM RDB$RELATIONS R INNER JOIN RDB$RELATION_FIELDS RF ON 
RF.RDB$RELATION_NAME=R.RDB$RELATION_NAME WHERE RDB$RELATION_NAME='abc'

we got fully descriptive message with FIELD name like below

Engine Code    : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -204
Ambiguous field name between table RDB$RELATION_FIELDS and table RDB$RELATIONS 
RDB$RELATION_NAME <-------- here we have field 

but when we do this inside procedure


SET TERM ^ ;
CREATE PROCEDURE XYZ
AS
DECLARE VARIABLE VAR_TMP INTEGER;
begin
SELECT 1 FROM RDB$RELATIONS R INNER JOIN RDB$RELATION_FIELDS RF ON 
RF.RDB$RELATION_NAME=R.RDB$RELATION_NAME WHERE RDB$RELATION_NAME='abc' INTO 
:VAR_TMP;
END^
SET TERM ; ^

we got only:
Engine Code    : 335544351
Engine Message :
unsuccessful metadata update
CREATE PROCEDURE XYZ failed
Dynamic SQL Error
SQL error code = -204
Ambiguous field name between table RDB$RELATION_FIELDS and table RDB$RELATIONS 

as you can see it is without problematic field name

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to