Skip to content

DatabaseMetadata.getProcedures and getFunctions return both functions and procedures #2690

Open
@dqmdev

Description

@dqmdev

Driver 12.10.0.0
Azure SQL Server 12.00.601

A database has both stored procedures and functions defined in it.

Calling DatabaseMetadata.getProcedures( "foo", "bar", %) returns a Resultset that includes the functions.

Calling DatabaseMetadata.getFunctions( "foo", "bar", %) returns a Resultset that includes the procedures.

Expecting to receive Resultsets where the data reflects just procedures or functions for the applicable method being called.

Object in the database starting with the letter F = Function and P = Procedure

Column Name:FUNCTION_CAT, display size:128, type name:nvarchar, type id:-9, precision:128, scale:0
Column Name:FUNCTION_SCHEM, display size:128, type name:nvarchar, type id:-9, precision:128, scale:0
Column Name:FUNCTION_NAME, display size:134, type name:nvarchar, type id:-9, precision:134, scale:0
Column Name:NUM_INPUT_PARAMS, display size:11, type name:int, type id:4, precision:10, scale:0
Column Name:NUM_OUTPUT_PARAMS, display size:11, type name:int, type id:4, precision:10, scale:0
Column Name:NUM_RESULT_SETS, display size:11, type name:int, type id:4, precision:10, scale:0
Column Name:REMARKS, display size:254, type name:varchar, type id:12, precision:254, scale:0
Column Name:FUNCTION_TYPE, display size:6, type name:smallint, type id:5, precision:5, scale:0
[foo],[bar],[FINBINT;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINBLOB;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINCHAR;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINDEC;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINDISBINT;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINDISBLOB;0],[-1],[-1],[-1],[null],[2]
.....
[foo],[bar],[FINTSTZ;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINVCHAR;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FNOPARAMS;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINBINT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINBLOB;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINCHAR;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDEC;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISBINT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISBLOB;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISCHAR;1],[-1],[-1],[-1],[null],[2]
...

Column Name:PROCEDURE_CAT, display size:128, type name:nvarchar, type id:-9, precision:128, scale:0
Column Name:PROCEDURE_SCHEM, display size:128, type name:nvarchar, type id:-9, precision:128, scale:0
Column Name:PROCEDURE_NAME, display size:134, type name:nvarchar, type id:-9, precision:134, scale:0
Column Name:NUM_INPUT_PARAMS, display size:11, type name:int, type id:4, precision:10, scale:0
Column Name:NUM_OUTPUT_PARAMS, display size:11, type name:int, type id:4, precision:10, scale:0
Column Name:NUM_RESULT_SETS, display size:11, type name:int, type id:4, precision:10, scale:0
Column Name:REMARKS, display size:254, type name:varchar, type id:12, precision:254, scale:0
Column Name:PROCEDURE_TYPE, display size:6, type name:smallint, type id:5, precision:5, scale:0
[foo],[bar],[FINBINT;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINBLOB;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINCHAR;0],[-1],[-1],[-1],[null],[2]
.....
[foo],[bar],[FINRL;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINSINT;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINTM;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINTS;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINTSTZ;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FINVCHAR;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[FNOPARAMS;0],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINBINT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINBLOB;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINCHAR;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDEC;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISBINT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISBLOB;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISCHAR;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISDEC;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISDT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISFLT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISINT;1],[-1],[-1],[-1],[null],[2]
[foo],[bar],[PINDISNCHAR;1],[-1],[-1],[-1],[null],[2]

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions