Postgres Plus Advanced Server Oracle Compatibility Developer's Guide : 9.3 OCL Reference

Previous PageTable Of ContentsNext Page

Postgres Plus Advanced Server Oracle Compatibility Developer's Guide

 

9.3 OCL Reference

The following tables list the functions supported in the Open Client Library. Note that any and all header files must be supplied by the user. Postgres Plus Advanced Server does not supply any such files.

9.3.1 Connect, Authorize and Initialize Functions

Table 9-9-1 Connect, Authorize, Terminate and Initialize Functions

Function

Description

OCIBreak

Aborts the specified OCI function.

OCIEnvCreate

Create an OCI environment.

OCIEnvInit

Initialize an OCI environment handle.

OCIInitialize

Initialize the OCI environment.

OCILogoff

Release a session.

OCILogon

Create a logon connection.

OCILogon2

Create a logon session in various modes.

OCIServerAttach

Establish an access path to a data source.

OCIServerDetach

Remove access to a data source.

OCISessionBegin

Create a user session.

OCISessionEnd

End a user session.

OCISessionGet

Get session from session pool.

OCISessionRelease

Release a session.

OCITerminate

Detach from shared memory subsystem.

9.3.2 Handle and Descriptor Functions

Table 9-9-2 Handle and Descriptor Functions

Function

Description

OCIAttrGet

Get handle attributes.

OCIAttrSet

Set handle attributes.

OCIDescriptorAlloc

Allocate and initialize a descriptor.

OCIDescriptorFree

Free an allocated descriptor.

OCIHandleAlloc

Allocate and initialize a handle.

OCIHandleFree

Free an allocated handle.

OCIParamGet

Get a parameter descriptor.

OCIParamSet

Set a parameter descriptor.

9.3.3 Bind, Define and Describe Functions

Table 9-9-3 Bind, Define, and Describe Functions

Function

Description

OCIBindByName

Bind by name.

OCIBindByPos

Bind by position.

OCIBindDynamic

Set additional attributes after bind.

OCIBindArrayOfStruct

Bind an array of structures for bulk operations.

OCIDefineByPos

Define an output variable association.

OCIDefineDynamic

Set additional attributes for define.

OCIDescribeAny

Describe existing schema objects.

OCIStmtGetBindInfo

Get bind and indicator variable names and handle.

9.3.4 Statement Functions

Table 9-9-4 Statement Functions

Function

Description

OCIStmtExecute

Execute a prepared SQL statement.

OCIStmtFetch

Fetch rows of data (deprecated).

OCIStmtFetch2

Fetch rows of data.

OCIStmtPrepare

Prepare a SQL statement.

OCIStmtPrepare2

Prepare a SQL statement.

OCIStmtRelease

Release a statement handle.

9.3.5 Transaction Functions

Table 9-9-5 Transaction Functions

Function

Description

OCITransCommit

Commit a transaction.

OCITransRollback

Roll back a transaction.

9.3.6 Date and Datetime Functions

Table 9-9-6 Date and Datetime Functions

Function

Description

OCIDateAddDays

Add or subtract a number of days.

OCIDateAddMonths

Add or subtract a number of months.

OCIDateAssign

Assign a date.

OCIDateCheck

Check if the given date is valid.

OCIDateCompare

Compare two dates.

OCIDateDaysBetween

Find the number of days between two dates.

OCIDateFromText

Convert a string to a date.

OCIDateGetDate

Get the date portion of a date.

OCIDateGetTime

Get the time portion of a date.

OCIDateLastDay

Get the date of the last day of the month.

OCIDateNextDay

Get the date of the next day.

OCIDateSetDate

Set the date portion of a date.

OCIDateSetTime

Set the time portion of a date.

OCIDateSysDate

Get the current system date and time.

OCIDateToText

Convert a date to a string.

OCIDateTimeAssign

Perform datetime assignment.

OCIDateTimeCheck

Check if the date is valid.

OCIDateTimeCompare

Compare two datetime values.

OCIDateTimeConstruct

Construct a datetime descriptor.

OCIDateTimeConvert

Convert one datetime type to another.

OCIDateTimeFromArray

Convert an array of size OCI_DT_ARRAYLEN to an OCIDateTime descriptor.

OCIDateTimeFromText

Convert the given string to Oracle datetime type in the OCIDateTime descriptor according to the specified format.

OCIDateTimeGetDate

Get the date portion of a datetime value.

OCIDateTimeGetTime

Get the time portion of a datetime value.

OCIDateTimeGetTimeZoneName

Get the time zone name portion of a datetime value.

OCIDateTimeGetTimeZoneOffset

Get the time zone (hour, minute) portion of a datetime value.

OCIDateTimeSubtract

Take two datetime values as input and return their difference as an interval.

OCIDateTimeSysTimeStamp

Get the system current date and time as a timestamp with time zone.

OCIDateTimeToArray

Convert an OCIDateTime descriptor to an array.

OCIDateTimeToText

Convert the given date to a string according to the specified format.

9.3.7 Interval Functions

Table 9-9-7 Interval Functions

Function

Description

OCIIntervalAdd

Adds two interval values.

OCIIntervalAssign

Copies one interval value into another interval value.

OCIIntervalCompare

Compares two interval values.

OCIIntervalGetDaySecond

Extracts days, hours, minutes, seconds and fractional seconds from an interval.

OCIIntervalGetYearMonth

Extracts year and month values from an interval.

OCIIntervalSetYearMonth

Modifies year and month values in an interval.

OCIIntervalDivide

Implements division of OCIInterval values by OCINumber values.

OCIIntervalMultiply

Implements multiplication of OCIInterval values by OCINumber values.

OCIIntervalSubtract

Subtracts one interval value from another interval value.

OCIIntervalToText

Extrapolates a character string from an interval.

OCIIntervalCheck

Verifies the validity of an interval value.

OCIIntervalToNumber

Converts an OCIInterval value into a OCINumber value.

OCIIntervalFromNumber

Converts a OCINumber value into an OCIInterval value.

OCIDateTimeIntervalAdd

Adds an OCIInterval value to an OCIDatetime value, resulting in an OCIDatetime value.

OCIDateTimeIntervalSub

Subtracts an OCIInterval value from an OCIDatetime value, resulting in an OCIDatetime value.

OCIIntervalFromText

Converts a text string into an interval.

OCIIntervalFromTZ

Converts a time zone specification into an interval value.

9.3.8 Number Functions

Table 9-9-8 Number Functions

Function

Description

OCINumberAbs

Compute the absolute value.

OCINumberAdd

Adds NUMBERs.

OCINumberArcCos

Compute the arc cosine.

OCINumberArcSin

Compute the arc sine.

OCINumberArcTan

Compute the arc tangent.

OCINumberArcTan2

Compute the arc tangent of two NUMBERs.

OCINumberAssign

Assign one NUMBER to another.

OCINumberCeil

Compute the ceiling of NUMBER.

OCINumberCmp

Compare NUMBERs.

OCINumberCos

Compute the cosine.

OCINumberDec

Decrement a NUMBER.

OCINumberDiv

Divide two NUMBERs.

OCINumberExp

Raise e to the specified NUMBER power.

OCINumberFloor

Compute the floor of a NUMBER.

OCINumberFromInt

Convert an integer to an Oracle NUMBER.

OCINumberFromReal

Convert a real to an Oracle NUMBER.

OCINumberFromText

Convert a string to an Oracle NUMBER.

OCINumberHypCos

Compute the hyperbolic cosine.

OCINumberHypSin

Compute the hyperbolic sine.

OCINumberHypTan

Compute the hyperbolic tangent.

OCINumberInc

Increments a NUMBER.

OCINumberIntPower

Raise a given base to an integer power.

OCINumberIsInt

Test if a NUMBER is an integer.

OCINumberIsZero

Test if a NUMBER is zero.

OCINumberLn

Compute the natural logarithm.

OCINumberLog

Compute the logarithm to an arbitrary base.

OCINumberMod

Modulo division.

OCINumberMul

Multiply NUMBERs.

OCINumberNeg

Negate a NUMBER.

OCINumberPower

Exponentiation to base e.

OCINumberPrec

Round a NUMBER to a specified number of decimal places.

OCINumberRound

Round a NUMBER to a specified decimal place.

OCINumberSetPi

Initialize a NUMBER to Pi.

OCINumberSetZero

Initialize a NUMBER to zero.

OCINumberShift

Multiply by 10, shifting specified number of decimal places.

OCINumberSign

Obtain the sign of a NUMBER.

OCINumberSin

Compute the sine.

OCINumberSqrt

Compute the square root of a NUMBER.

OCINumberSub

Subtract NUMBERs.

OCINumberTan

Compute the tangent.

OCINumberToInt

Convert a NUMBER to an integer.

OCINumberToReal

Convert a NUMBER to a real.

OCINumberToRealArray

Convert an array of NUMBER to a real array.

OCINumberToText

Converts a NUMBER to a string.

OCINumberTrunc

Truncate a NUMBER at a specified decimal place.

9.3.9 String Functions

Table 9-9-9 String Functions

Function

Description

OCIStringAllocSize

Get allocated size of string memory in bytes.

OCIStringAssign

Assign string to a string.

OCIStringAssignText

Assign text string to a string.

OCIStringPtr

Get string pointer.

OCIStringResize

Resize string memory.

OCIStringSize

Get string size.

9.3.10 Cartridge Services and File I/O Interface Functions

Table 9-9-10 Cartridge Services and File I/O Interface Functions

Function

Description

OCIFileClose

Close an open file.

OCIFileExists

Test to see if the file exists.

OCIFileFlush

Write buffered data to a file.

OCIFileGetLength

Get the length of a file.

OCIFileInit

Initialize the OCIFile package.

OCIFileOpen

Open a file.

OCIFileRead

Read from a file into a buffer.

OCIFileSeek

Change the current position in a file.

OCIFileTerm

Terminate the OCIFile package.

OCIFileWrite

Write buflen bytes into the file.

SQLT_STR

Zero-terminated string

SQLT_TIMESTAMP

Timestamp

SQLT_TIMESTAMP_TZ

Timestamp with time zone

SQLT_TIMESTAMP_LTZ

Timestamp with local time zone

SQLT_UIN

Unsigned integer

SQLT_VBI

VCS format binary

SQLT_VCS

Variable character

SQLT_VNU

Number with preceding length byte

SQLT_VST

OCI string type

9.3.11 Miscellaneous Functions

Table 9-9-11 Miscellaneous Functions

Function

Description

OCIClientVersion

Return client library version.

OCIErrorGet

Return error message.

OCIPasswordChange

Change password.

OCIPing

Confirm that the connection and server are active.

OCIServerVersion

Get the Oracle version string.

9.3.12 Supported Data Types

Table 9-9-12 Supported Data Types

Function

Description

ANSI_DATE

ANSI date

SQLT_AFC

ANSI fixed character

SQLT_AVC

ANSI variable character

SQLT_BDOUBLE

Binary double

SQLT_BIN

Binary data

SQLT_BFLOAT

Binary float

SQLT_CHR

Character string

SQLT_DAT

Oracle date

SQLT_DATE

ANSI date

SQLT_FLT

Float

SQLT_INT

Integer

SQLT_LBI

Long binary

SQLT_LNG

Long

SQLT_LVB

Longer long binary

SQLT_LVC

Longer longs (character)

SQLT_NUM

Oracle numeric

SQLT_ODT

OCI date type

Previous PageTable Of ContentsNext Page