DataGrip 2021.2 Help

Code Inspection: Using of named and positional arguments

Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.

Example (In PostgreSQL):

CREATE FUNCTION foo(a int, b int, c int) RETURNS int LANGUAGE plpgsql AS $$ BEGIN RETURN a + b + c; END $$; SELECT foo(a => 1, b => 2, c => 3); -- `3` goes after the named argument SELECT foo(1, b => 2, 3); -- `1` and `3` go after the named argument SELECT foo(b => 2, 1, 3);

Suppress an inspection in the editor

  1. Position the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 16 July 2021