Ingres CL Facilities

From Ingres Community Wiki

Jump to: navigation, search

Ingres Compatability Library
Architecture - Overview - Suggestions - GL: BA - BT - ERGL - handy - HSH - LC - LL - MEGL - MM - MO - MU - PM - SP - TMGL - CL: CI - CK - CM - CP - CS - CSMT - CV - CX - DI - DL - DS - ER - ERold - EX - FP - GC - GV - handy - ID - JF - LG - LK - LO - ME - MH - NM - OL - PC - PE - QU - SA - SI - SR - ST - TC - TE - TH - TM - TR - UT

Facilities Provided by the CL and the GL

Each of these facilities is fully described in its own document.

<compat.h>

Type definitions, structures and constants assumed by all users of the CL and GL. Client code must include this file before any other headers.

<clfloat.h>

Describes the characteristics of the floating point used on the target system.

BA

Block Allocation. Block Allocation provides facilities for allocating and deallocating memory units in a "block" fashion. Instead of allocating one structure at a time, a bunch of structures are allocated in one shot.

BT

Bit array manipulation. Operations on arbitrary length bit strings, such as logical and, or, not; test bit, set bit, clear bit. This may be used by user interfaces and the DBMS

CI

Customer Information (authorization) functions. Heart of the Ingres Authorization Strings, and contains a DES-like encryption system. This is used by user interfaces and the DBMS.

CK

Checkpoint/Recover. Makes disk or tape checkpoints of database directories. It may be used only by DBMS executables.

CM

Character Manipulation: international character support, used by all Ingres programs to manipulate and classify strings and characters that may be either normal single-byte C language strings or multiple character strings as needed by some character sets, such as Japanese Kanji. It is essential that CM operations be used most places rather than normal C pointer manipulation, or multi-byte characters won't work correctly. A major difference from the standard <ctype.h> macros is that CM takes pointers and not character values.

CP

Change Protection for file operations. Used only by the DBMS Auditdb program and the Five-Six-Gateway (FSGW). It creates and writes files for "copy out operations with the correct user permissions when run from privileged applications.

CS

Control System. Threading control mechanism used by the DBMS.

CV

Conversions. A plethora of data conversion functions used by all Ingres programs, such as character string to anything, and anything to character string. Many of these are labeled "ASCII to thing" or "thing to ASCII." This is not an intended slight to EBCDIC systems, but a historical oversight. CV also contains the machine dependent data conversions necessary for heterogeneous network operation, changing from host machine representation to canonical network representations.

CX

Cluster Facility.

DI

Database I/O. Used by DBMS executables to access database files.

DL

Dynamic Loading. Code that provides access to user-written 3GL code. It creates dynamic-link object modules in machine native format, and loads these object modules into the current process allowing them to be executed.

DS

Data Structure compiler. User interface programs write files containing data structure definitions that will be compiled and subsequently linked into Ingres applications. How we write "compiled form" source files.

DY

Dynamic linker/loader. An obsolete facility once used by abf and the unsupported findform program. It loads object modules into the current process allowing them to be executed. This functionality can be accessed by the DL subfacility.

ER

Error message text. The name ER is a misnomer, as this is the way that all Ingres programs are to get all text messages from external files. The main facility is looking up message text given a message number. There are two flavors of this operation. ERlookup is the full fledged version suitable for use anywhere. ERget is a simpler version that may not be used in DBMS executables. In addition, the ERsend function may used to write messages to error log files. This subfacility has components in both the CL and GL facility.

ERold

Archive copies of older message files for backward compatability.

EX

Exception handling. Error and events handling, combining aspects of the C signal and setjmp/longjmp facilities. Because it interacts with the signal/setjmp facilities available in C to users, the use of EX should be avoided in code that is to be linked with user applications.

FP

Floating Point. Floating point operations and functions, eventually to replace the analagous and obsolete MH functions. The FP functions have a consistant and correct handling of exceptional conditions that make them safer and more reliable to use: they never raise exceptions.

GC

General Communication. System dependent support for the GCA facility used to provide interprocess communication between applications and servers, and is only to be used by GCF. In being used by GCF, it is therefore used by both application and server programs. The GC CL code is divided into two parts, that used for local IPC on a single machine, and that used by Ingres/NET across systems and talking various network protocols in a known way.

GV

Global symbol Values. Defines global variables of general use to all Ingres executables.

handy

Routines to specify machine, OS dynamic configuration information. These issues are very likely to be very system specific (ie. it is very likely this file will have many ifdef's). This subfacility lives in both the CL and the GL subfacility.

HSH

Hash Functions. The hash module provides facilities for allocating, deallocating, inserting, and searching a hash index.

ID

Identification. Determines user names. Its use outside the CL is suspect, as it will often not do what is anticipated.

JF

Journal File operations. Used by DBMS executables to access journals and the dump files used in on-line checkpoint.

LC

Locale specific functions. This subfacility lives in the GL Facility.

LG

Log file operations. Used by DBMS for database logging operations. This is now an Obsolete facility as the functionality has been moved from the CL to DMF.

LK

Lock manager. Used by the DBMS to provide concurrency control over database objects. This is now an Obsolete facility as the functionality has been moved from the CL to DMF.

LL

Linked-List functions. The Linked List (LL) facility maintains a circular, doubly linked list of objects. It is used in conjunction with any object structure to create, maintain, and search a linked list of those objects.

LO

File location manipulation. Hides system dependent file names. It is used primarily by user-interface programs. Only LOingpath and LOingdir may be used by the DBMS.

ME

Memory manipulation. General operations on arbitrary memory, such as copy, compare, allocate and free. There are two allocator flavors within the CL, the MEreqmem family and MEget_pages. MEreqmem is not to be used by DBMS mainline code. MEget_pages combines memory allocation and access to shared memory. This subfacility lives in both the CL and GL facilities.

MH

Math functions. This provides the usual collection of math operations used in both the DBMS and in user-interface programs. (Made obsolete by FP).

MM

MM allocator system. This subfacility lives in the GL facility.

MO

Management objects. This new, portable GL module provides a way of making program variables visible as named objects though mangement interfaces. It lets programmers add meters and knobs to their code that will be visible in a consistant way to user applications with minimal effort.

MU

Mutual Exclusion. This new, portable GL module Provides semapahore operations that are appropriate for code that sometimes runs in a threaded environment, and sometimes doesn't. It's particularly appropriate for use in other GL code, and in 3GL runtime code that needs to be thread-safe.

NM

Name/value pair lookup. Corresponds to UNIX/NT environment variables or to VMS logical symbols, and must provide at least two levels of name/value pair manipulation. One level may be modified by users, and the other may only be modified by those with appropriate privileges. Some functions are used to locate files within an installation.

OL

Other Language interface. A way for C programs to call functions that are written in other languages, such as FORTRAN. It is to be used exclusively by abf.

PC

Process Control. General process control functions used in all Ingres programs, such as exit, start another process, sleep for a while, etc. The PCatexit function is a convenient way to handle cleanup operations without resorting to EX.

PE

Permissions. Set permissions on files created by SI, and is therefore only used in user-interface programs.

PM

Parameter management. This new, portable GL module provides a uniform way of getting at static system parameters. It is used to store server parameters and other intstallation configuration information.

QU

Queue manipulation. Operate on doubly linked lists, used everywhere.

SA

Security Auditing.

SI

Stream file I/O. <stdio.h>-like operations for user-interface programs. It is not to be used by mainline DBMS code.

SP

Splay trees. This portable GL module provides easy-to-use access to a very efficient in-memory tree structure suitable for symbol tables, lookup tables, priority queues and the like.

SR

Sort file manipulation. Used by the DBMS to operate on files temporarily used for sorting.

ST

String manipulation. Functions used everywhere for manipulating NULL terminated C strings. The strings may contain multi-byte characters.

TC

Test Communications. Test point access to user-interface programs taking input from SI and TE. The input and output of a program under test will be from a separate process, usually SEP.

TE

Terminal handling. User-interface access to the character terminal for input and output.

TH

Thread functions. Threading control functions used outside of the DBMS.

TM

Time functions. A collection of functions for determining the current time process accounting information. Beware of the TMzone function that provides today's timezone correction. This may not be what you want. This subfacility lives in both the CL and GL facility.

TR

Trace functions. Major facilities are the TRdisplay function (a glorified printf) that is the sole way DBMS executables are to write messages to log files, and its cousin, TRformat. TRdisplay and TRformat are solely for the use of the DBMS. The other TR functions may be used anywhere.

UT

Utility invocation. Operations for user interfaces to compile programs, execute other programs, and to print files.

Ingres Compatability Library
Architecture - Overview - Suggestions - GL: BA - BT - ERGL - handy - HSH - LC - LL - MEGL - MM - MO - MU - PM - SP - TMGL - CL: CI - CK - CM - CP - CS - CSMT - CV - CX - DI - DL - DS - ER - ERold - EX - FP - GC - GV - handy - ID - JF - LG - LK - LO - ME - MH - NM - OL - PC - PE - QU - SA - SI - SR - ST - TC - TE - TH - TM - TR - UT

Personal tools
Developing With