FNC_TblOpGetContractPhase Function | C Library Functions | Teradata Vantage - FNC_TblOpGetContractPhase - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Indicates the phase in the parser from which the contract function is being called.

Syntax

int
FNC_TblOpGetContractPhase()

Return Value

The parser phases are as follows:
  • FNC_CTRCT_GET_ALLCOLS_PHASE = 0

    Indicates that all columns for the remote table should be returned.

  • FNC_CTRCT_VALIDATE_PHASE = 1
    Validates that the given inputs are correct. The contract function can be called multiple times from this phase.
    This phase is currently not used.
  • FNC_CTRCT_COMPLETE_PHASE = 2

    Indicates that this is the last call of the contract function and any foreign server actions that need to be done should be completed.

  • FNC_CTRCT_DDL_PHASE = 3

    Indicates that execution of the CREATE SERVER statement is being completed and the connectivity should be verified.

  • FNC_CTRCT_DEFINE_SERVER_PHASE = 4

    Indicates that a CREATE VIEW or CREATE MACRO statement is being executed and that the custom clause data may not be valid.

Usage Notes

This routine is callable on a PE vproc only by a table operator.