SPI_execute_plan_with_paramlist

SPI_execute_plan_with_paramlist — выполнить оператор, подготовленный функцией SPI_prepare

Синтаксис

int SPI_execute_plan_with_paramlist(SPIPlanPtr plan,
                                    ParamListInfo params,
                                    bool read_only,
                                    long count)

Описание

SPI_execute_plan_with_paramlist выполняет оператор, подготовленный функцией SPI_prepare. Данная функция равнозначна SPI_execute_plan, не считая того, что информация о значениях параметров, передаваемых запросу, представляется по-другому. Представление ParamListInfo может быть удобным для передачи значений, уже имеющих нужный формат. Эта функция также поддерживает динамические наборы параметров, которые реализуются через функции-обработчики, устанавливаемые в ParamListInfo.

Эта функция устарела, используйте вместо неё SPI_execute_plan_extended.

Аргументы

SPIPlanPtr plan

подготовленный оператор (возвращаемый функцией SPI_prepare)

ParamListInfo params

структура данных, содержащая типы и значения параметров; NULL, если их нет

bool read_only

true для режима выполнения «только чтение»

long count

максимальное число строк, которое должно быть возвращено; с 0 ограничения нет

Возвращаемое значение

Возвращаемые значения те же, что и у SPI_execute_plan.

Переменные SPI_processed и SPI_tuptable устанавливаются как в SPI_execute_plan, если вызов был успешным.

38.17. constraint_column_usage

The view constraint_column_usage identifies all columns in the current database that are used by some constraint. Only those columns are shown that are contained in a table owned by a currently enabled role. For a check constraint, this view identifies the columns that are used in the check expression. For a foreign key constraint, this view identifies the columns that the foreign key references. For a unique or primary key constraint, this view identifies the constrained columns.

Table 38.15. constraint_column_usage Columns

NameData TypeDescription
table_catalogsql_identifier Name of the database that contains the table that contains the column that is used by some constraint (always the current database)
table_schemasql_identifier Name of the schema that contains the table that contains the column that is used by some constraint
table_namesql_identifier Name of the table that contains the column that is used by some constraint
column_namesql_identifier Name of the column that is used by some constraint
constraint_catalogsql_identifierName of the database that contains the constraint (always the current database)
constraint_schemasql_identifierName of the schema that contains the constraint
constraint_namesql_identifierName of the constraint