Incorrect error for PSQL function when the number of actual arguments does not match the number of formal arguments. --------------------------------------------------------------------------------------------------------------------
Key: CORE-4572 URL: http://tracker.firebirdsql.org/browse/CORE-4572 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0 Alpha 2 Environment: isql, Firebird WI-T3.0.0.31353 Firebird 3.0 Alpha 2 Reporter: Simonov Denis Priority: Minor Incorrect error for PSQL function when the number of actual arguments does not match the number of formal arguments. There are some functions and procedures. CREATE OR ALTER FUNCTION GET_MNEMONIC ( AFIELD_NAME TYPE OF COLUMN RDB$TYPES.RDB$FIELD_NAME, ATYPE TYPE OF COLUMN RDB$TYPES.RDB$TYPE) RETURNS TYPE OF COLUMN RDB$TYPES.RDB$TYPE_NAME AS BEGIN RETURN(SELECT RDB$TYPE_NAME FROM RDB$TYPES WHERE RDB$FIELD_NAME = :AFIELD_NAME AND RDB$TYPE = :ATYPE); END CREATE OR ALTER PROCEDURE SP_GET_MNEMONIC ( AFIELD_NAME TYPE OF COLUMN RDB$TYPES.RDB$FIELD_NAME, ATYPE TYPE OF COLUMN RDB$TYPES.RDB$TYPE) RETURNS ( OUT TYPE OF COLUMN RDB$TYPES.RDB$TYPE_NAME) AS BEGIN SELECT RDB$TYPE_NAME FROM RDB$TYPES WHERE RDB$FIELD_NAME = :AFIELD_NAME AND RDB$TYPE = :ATYPE INTO :OUT; END Use CONNECT or CREATE DATABASE to specify a database SQL> set names win1251; SQL> connect 'localhost:test' user 'sysdba' password 'masterkey'; Database: 'localhost:test', User: sysdba SQL> select get_mnemonic('RDB$FIELD_TYPE', 14) as t from rdb$database; T =============================== TEXT SQL> EXECUTE PROCEDURE SP_GET_MNEMONIC('RDB$FIELD_TYPE', 14); OUT =============================== TEXT SQL> select get_mnemonic('RDB$FIELD_TYPE') as t from rdb$database; Statement failed, SQLSTATE = 39000 invalid request BLR at offset 52 -function GET_MNEMONIC could not be matched SQL> EXECUTE PROCEDURE SP_GET_MNEMONIC('RDB$FIELD_TYPE'); Statement failed, SQLSTATE = 07001 Dynamic SQL Error -Input parameter mismatch for procedure SP_GET_MNEMONIC It seems to me that the error message for PSQL functions should be the same as for the procedure. -- 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 ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel