Generic arguments in the procedure signature

You can define generic arguments and the standard data-type-and-size-specific arguments in the signature of a stored procedure. The Netezza Performance Server software verifies that all the input arguments match the required number and data types of the signature.

For arguments that have a specific size, the Netezza Performance Server software also confirms that the size of the input value matches the defined signature size. If necessary, the Netezza Performance Server software casts the input values to match the size specified in the signature. For example, if you declare a string of 20 characters [CHAR(20)] in a signature, the Netezza Performance Server software implicitly truncates an input string that is longer than 20 characters or adds padding if the input string is less than 20 characters.

For generic arguments, the argument values are passed to the procedure without any casting or changes. For example, if you declare a CHAR(ANY) input value, the procedure accepts character strings of any length up to the supported maximum; it checks to make sure that the input value is a valid character string and that it occurs in the expected place of the signature.

The Netezza Performance Server software performs some implicit castings for the input values. For example, if you define an input argument as VARCHAR(ANY) in the signature, but you pass an input of CHAR(200) to the procedure, the procedure casts the CHAR(200) to VARCHAR(200). The procedure uses the data type of the signature and the size of the input value to determine the casting change.