8.14. DESCRIBE INPUT

Synopsis

  1. DESCRIBE INPUT statement_name

Description

Lists the input parameters of a prepared statement along with theposition and type of each parameter. Parameter types that cannot bedetermined will appear as unknown.

Examples

Prepare and describe a query with three parameters:

  1. PREPARE my_select1 FROM
  2. SELECT ? FROM nation WHERE regionkey = ? AND name < ?;
  1. DESCRIBE INPUT my_select1;

  1. Position | Type

  1. 0 | unknown
  2. 1 | bigint
  3. 2 | varchar

(3 rows)

Prepare and describe a query with no parameters:

  1. PREPARE my_select2 FROM
  2. SELECT * FROM nation;
  1. DESCRIBE INPUT my_select2;

  1. Position | Type

(0 rows)

See Also

PREPARE