Informix Guide To SQL Reference 10.0
Informix Guide To SQL Reference 10.0
Version 10.0/8.5
G251-2283-00
DB2 IBM Informix
®
Version 10.0/8.5
G251-2283-00
Note!
Before using this information and the product it supports, read the information in “Notices” on page E-1.
Contents v
Where to Set Environment Variables on Windows . . . . . . . . . . . . . . . . . . 3-5
Using Environment Variables on UNIX . . . . . . . . . . . . . . . . . . . . . 3-6
Setting Environment Variables in a Configuration File . . . . . . . . . . . . . . . 3-6
Setting Environment Variables at Login Time . . . . . . . . . . . . . . . . . . 3-6
Syntax for Setting Environment Variables . . . . . . . . . . . . . . . . . . . . 3-7
Unsetting Environment Variables . . . . . . . . . . . . . . . . . . . . . . 3-7
Modifying an Environment-Variable Setting . . . . . . . . . . . . . . . . . . . 3-8
Viewing Your Environment-Variable Settings . . . . . . . . . . . . . . . . . . . 3-8
Checking Environment Variables with the chkenv Utility . . . . . . . . . . . . . . 3-9
Rules of Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Using Environment Variables on Windows . . . . . . . . . . . . . . . . . . . . 3-10
Environment Settings for Native Windows Applications . . . . . . . . . . . . . . 3-10
Environment Settings for Command-Prompt Utilities . . . . . . . . . . . . . . . 3-11
Rules of Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
List of Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
AC_CONFIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
AFDEBUG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
ANSIOWNER (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
BIG_FET_BUF_SIZE (XPS) . . . . . . . . . . . . . . . . . . . . . . . . 3-19
CPFIRST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
DBACCNOIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
DBANSIWARN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
DBBLOBBUF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
DBCENTURY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
DBDATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
DBDELIMITER . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
DBEDIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
DBFLTMASK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
DBLANG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
DBMONEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
DBNLS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32
DBONPLOAD (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
DBPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
DBPRINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35
DBREMOTECMD (UNIX) . . . . . . . . . . . . . . . . . . . . . . . . 3-36
DBSPACETEMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-36
DBTEMP (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
DBTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39
DBUPSPACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-41
DEFAULT_ATTACH . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42
DELIMIDENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42
ENVIGNORE (UNIX) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43
FET_BUF_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
GLOBAL_DETACH_INFORM (XPS) . . . . . . . . . . . . . . . . . . . . . 3-45
IBM_XPS_PARAMS (XPS) . . . . . . . . . . . . . . . . . . . . . . . . 3-45
IFMX_CART_ALRM (XPS) . . . . . . . . . . . . . . . . . . . . . . . . 3-46
IFMX_HISTORY_SIZE (XPS) . . . . . . . . . . . . . . . . . . . . . . . . 3-47
IFMX_OPT_FACT_TABS (XPS) . . . . . . . . . . . . . . . . . . . . . . . 3-47
IFMX_OPT_NON_DIM_TABS (XPS) . . . . . . . . . . . . . . . . . . . . . 3-48
Contents vii
PLOAD_SHMBASE (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . 3-74
PSORT_DBTEMP . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-75
PSORT_NPROCS . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-76
RTREE_COST_ADJUST_VALUE (IDS) . . . . . . . . . . . . . . . . . . . . 3-77
SHLIB_PATH (UNIX) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-77
STMT_CACHE (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-77
TERM (UNIX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-78
TERMCAP (UNIX) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-78
TERMINFO (UNIX). . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
THREADLIB (UNIX) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
TOBIGINT (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-80
USETABLEAME (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-80
XFER_CONFIG (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-81
Index of Environment Variables. . . . . . . . . . . . . . . . . . . . . . . . 3-81
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1
See the documentation notes files, which are described in the section “Online
Notes” on page xviii of this Introduction, for a list of the manuals in the
documentation set of your Informix database server.
Types of Users
This manual is written for the following users:
v Database users
v Database administrators
v Database server administrators
v Database-application programmers
v Performance engineers
This manual assumes that your database uses the default locale. This default
is en_us.8859-1 (ISO 8859-1) on UNIX platforms or en_us.1252 (Microsoft
1252) in Windows environments. This locale supports U.S. English format
conventions for displaying and entering date, time, number, and currency
Dynamic Server
The scripts that you use to install the demonstration databases reside in the
$INFORMIXDIR/bin directory on UNIX platforms and in the
%INFORMIXDIR%\bin directory in Windows environments.
Introduction xi
Documentation Conventions
This section describes the conventions that this manual uses. These
conventions make it easier to gather information from this and other volumes
in the documentation set.
Convention Meaning
KEYWORD All primary elements in a programming language statement
(keywords) appear in uppercase letters in a serif font.
italics Within text, new terms and emphasized words appear in italics.
italics Within syntax and code examples, variable values that you are to
italics specify appear in italics.
boldface Names of program entities (such as classes, events, and tables),
boldface environment variables, file and pathnames, and interface elements
(such as icons, menu items, and buttons) appear in boldface.
monospace Information that the product displays and information that you
monospace enter appear in a monospace typeface.
KEYSTROKE Keys that you are to press appear in uppercase letters in a sans serif
font.
> This symbol indicates a menu item. For example, “Choose Tools >
Options” means choose the Options item from the Tools menu.
Dynamic Server
UNIX Only
Windows Only
This markup can apply to one or more paragraphs within a section. When an
entire section applies to a particular product or platform, this is noted as part
of the heading text, for example:
Table Sorting (Linux Only)
Syntax Diagrams
This guide uses syntax diagrams built with the following components to
describe the syntax for statements and all commands other than system-level
commands.
Introduction xiii
v How many times a loop can be repeated is now explained in a diagram
footnote instead of a number in a gate symbol.
v Syntax statements that are longer than one line now continue on the next
line instead of looping down with a continuous line.
v Product or condition-specific paths are now explained in diagram footnotes
instead of icons.
-t table
(1)
Setting the Run Mode
-S server -T target
Notes:
1 See page 17-4
The second line in this diagram has a segment named “Setting the Run
Mode,” which according to the diagram footnote, is on page 17-4. This
segment is shown in the following segment diagram (the diagram uses
segment start and end components).
Introduction xv
l
c
-f
d u n N
p
a
To construct a command correctly, start at the top left with the command.
Follow the diagram to the right, including the elements that you want. The
elements in the diagram are case sensitive.
You must also use any punctuation in your statements and commands exactly
as shown in the syntax diagrams.
The following syntax diagram uses variables to illustrate the general form of a
simple SELECT statement.
SELECT column_name FROM table_name
When you write a SELECT statement of this form, you replace the variables
column_name and table_name with the name of a specific column and table.
Example Code Conventions
Examples of SQL code occur throughout this manual. Except as noted, the
code is not specific to any single IBM Informix application development tool.
If only SQL statements are listed in the example, they are not delimited by
semicolons. For instance, you might see the code in the following example:
CONNECT TO stores_demo
...
COMMIT WORK
DISCONNECT CURRENT
To use this SQL code for a specific product, you must apply the syntax rules
for that product. For example, if you are using DB–Access, you must delimit
multiple statements with semicolons. If you are using an SQL API, you must
use EXEC SQL at the start of each statement and a semicolon (or other
appropriate delimiter) at the end of the statement.
Tip: Ellipsis points in a code example indicate that more code would be
added in a full application, but it is not necessary to show it to describe
the concept being discussed.
Introduction xvii
Additional Documentation
For additional information, refer to the following types of documentation:
v Installation guides
v Online notes
v Informix error messages
v Manuals
v Online help
Installation Guides
Installation guides are located in the /doc directory of the product CD or in
the /doc directory of the product‘s compressed file if you downloaded it from
the IBM Web site. Alternatively, you can obtain installation guides from the
IBM Informix Online Documentation site at
http://www.ibm.com/software/data/informix/pubs/library/.
Online Notes
The following sections describe the online files that supplement the
information in this manual. Please examine these files before you begin using
your IBM Informix product. They contain vital information about application
and performance issues.
Before Installation
All online notes are located in the /doc directory of the product CD. The
easiest way to access the documentation notes, the release notes, and the fixed
and known defects file is through the hyperlinks from the TOC notes file.
The machine notes file and the fixed and known defects file are only provided
in text format.
After Installation
Introduction xix
On UNIX platforms in the default locale, the documentation notes, release
notes, and machine notes files appear under the
$INFORMIXDIR/release/en_us/0333 directory.
Dynamic Server
ids_win_fixed_and_known ids_win_fixed_and_known
_defects_version.txt _defects_10.0.txt
On UNIX platforms, use the finderr command to read the error messages and
their corrective actions.
Dynamic Server
On Windows, use the Informix Error Messages utility to read error messages
and their corrective actions. To display this utility, choose Start > Programs >
IBM Informix Dynamic Server version > Informix Error Messages from the
taskbar.
End of Dynamic Server
Online Manuals
A CD that contains your manuals in electronic format is provided with your
IBM Informix products. You can install the documentation or access it directly
from the CD. For information about how to install, read, and print online
manuals, see the installation insert that accompanies your CD. You can also
obtain the same online manuals from the IBM Informix Online Documentation
site at http://www.ibm.com/software/data/informix/pubs/library/.
Printed Manuals
To order hardcopy manuals, contact your sales representative or visit the IBM
Publications Center Web site at
http://www.ibm.com/software/howtobuy/data.html.
Online Help
IBM Informix online help, provided with each graphical user interface (GUI),
displays information about those interfaces and the functions that they
perform. Use the help facilities that each GUI provides to display the online
help.
Accessibility
IBM is committed to making our documentation accessible to persons with
disabilities. Our books are available in HTML format so that they can be
accessed with assistive technology such as screen reader software. The syntax
diagrams in our manuals are available in dotted decimal format, which is an
accessible format that is available only if you are using a screen reader. For
more information about the dotted decimal format, see the Accessibility
appendix.
IBM Informix Dynamic Server Version 10.0 and CSDK Version 2.90
Documentation Set
The following tables list the manuals that are part of the IBM Informix
Dynamic Server, Version 10.0 and the CSDK Version 2.90, documentation set.
PDF and HTML versions of these manuals are available at
http://www.ibm.com/software/data/informix/pubs/library/. You can order
hardcopy versions of these manuals from the IBM Publications Center at
http://www.ibm.com/software/howtobuy/data.html.
Introduction xxi
Table 1. Database Server Manuals
Manual Subject
Administrator’s Guide Understanding, configuring, and administering your database server.
Administrator’s Reference Reference material for Informix Dynamic Server, such as the syntax of
database server utilities onmode and onstat, and descriptions of
configuration parameters, the sysmasters tables, and logical-log records.
Backup and Restore Guide The concepts and methods you need to understand when you use the
ON-Bar and ontape utilities to back up and restore data.
DB-Access User’s Guide Using the DB-Access utility to access, modify, and retrieve data from
Informix databases.
DataBlade API The DataBlade API functions and the subset of ESQL/C functions that
Function Reference the DataBlade API supports. You can use the DataBlade API to develop
client LIBMI applications and C user-defined routines that access data in
Informix databases.
DataBlade API The DataBlade API, which is the C-language application-programming
Programmer’s Guide interface provided with Dynamic Server. You use the DataBlade API to
develop client and server applications that access data stored in Informix
databases.
Database Design and Designing, implementing, and managing your Informix databases.
Implementation Guide
Enterprise Replication How to design, implement, and manage an Enterprise Replication system
Guide to replicate data between multiple database servers.
Error Messages file Causes and solutions for numbered error messages you might receive
when you work with IBM Informix products.
Getting Started Guide Describes the products bundled with IBM Informix Dynamic Server and
interoperability with other IBM products. Summarizes important features
of Dynamic Server and the new features for each version.
Guide to SQL: Reference Information about Informix databases, data types, system catalog tables,
environment variables, and the stores_demo demonstration database.
Guide to SQL: Syntax Detailed descriptions of the syntax for all Informix SQL and SPL
statements.
Guide to SQL: Tutorial A tutorial on SQL, as implemented by Informix products, that describes
the basic ideas and terms that are used when you work with a relational
database.
High-Performance Loader Accessing and using the High-Performance Loader (HPL), to load and
User’s Guide unload large quantities of data to and from Informix databases.
Installation Guide for Instructions for installing IBM Informix Dynamic Server on Windows.
Microsoft Windows
Installation Guide for Instructions for installing IBM Informix Dynamic Server on UNIX and
UNIX and Linux Linux.
Introduction xxiii
Table 2. Client/Connectivity Manuals (continued)
Manual Subject
ESQL/C Programmer’s The IBM Informix implementation of embedded SQL for C.
Manual
GLS User’s Guide The Global Language Support (GLS) feature, which allows IBM Informix
APIs and database servers to handle different languages, cultural
conventions, and code sets.
JDBC Driver Programmer’s Installing and using Informix JDBC Driver to connect to an Informix
Guide database from within a Java application or applet.
.NET Provider Reference Using Informix .NET Provider to enable .NET client applications to
Guide access and manipulate data in Informix databases.
ODBC Driver Programmer’s Using the Informix ODBC Driver API to access an Informix database and
Manual interact with the Informix database server.
OLE DB Provider Installing and configuring Informix OLE DB Provider to enable client
Programmer’s Guide applications, such as ActiveX Data Object (ADO) applications and Web
pages, to access data on an Informix server.
Object Interface for C++ The architecture of the C++ object interface and a complete class
Programmer’s Guide reference.
This email address is reserved for reporting errors and omissions in our
documentation. For immediate help with a technical problem, contact IBM
Technical Support.
Introduction xxv
xxvi IBM Informix Guide to SQL: Reference
Chapter 1. System Catalog Tables
Objects That the System Catalog Tables Track . . . . . . . . . . . . . . . . . . . 1-2
Using the System Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Structure of the System Catalog. . . . . . . . . . . . . . . . . . . . . . . . 1-10
SYSAGGREGATES (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
SYSAMS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
SYSATTRTYPES (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
SYSBLOBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
SYSCASTS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
SYSCHECKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
SYSCHECKUDRDEP (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
SYSCOLATTRIBS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
SYSCOLAUTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
SYSCOLDEPEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
SYSCOLUMNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
SYSCONSTRAINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
SYSDEFAULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
SYSDEPEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
SYSDIRECTIVES (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28
SYSDISTRIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28
SYSDOMAINS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-30
SYSERRORS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-30
SYSEXTCOLS (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
SYSEXTDFILES (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
SYSEXTERNAL (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
SYSFRAGAUTH (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
SYSFRAGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
SYSINDEXES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
SYSINDICES (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
SYSINHERITS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39
SYSLANGAUTH (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39
SYSLOGMAP (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40
SYSNEWDEPEND (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40
SYSOBJSTATE (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
SYSOPCLASSES (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
SYSOPCLSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42
SYSPROCAUTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-44
SYSPROCBODY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-44
SYSPROCEDURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45
SYSPROCPLAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-48
SYSREFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-49
SYSREPOSITORY (XPS) . . . . . . . . . . . . . . . . . . . . . . . . . . 1-49
SYSROLEAUTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-50
SYSROUTINELANGS (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . 1-50
SYSSEQUENCES (IDS) . . . . . . . . . . . . . . . . . . . . . . . . . . 1-51
In This Chapter
The system catalog consists of tables that describe the structure of the database.
Sometimes called the data dictionary, these tables contain everything that the
database knows about itself. Each system catalog table contains specific
information about elements in the database.
This chapter provides information about the structure, content, and use of the
system catalog tables. It also discusses the Information Schema, which
provides information about the tables, views, and columns on the current
database server.
Not all tables with the prefix sys are true system catalog tables. For example,
the syscdr database supports the Enterprise Replication feature. Non-catalog
tables, however, have a tabid >= 100. System catalog tables all have a tabid <
100. See later in this section and “SYSTABLES” on page 1-54 for more
information about tabid numbers that the database server assigns to tables,
views, synonyms, and (in Dynamic Server) sequence objects.
Tip: Do not confuse the system catalog tables of a database with the tables in
the sysmaster, sysutils, syscdr, or (for Dynamic Server) the sysuser
databases. The names of tables in those databases also have the sys
prefix, but they contain information about an entire database server,
which might manage multiple databases. Information in the sysmaster,
sysutils, syscdr, and sysuser tables is primarily useful for database
system administrators (DBSAs). See also the IBM Informix:
Administrator's Guide and IBM Informix: Administrator's Reference.
The database server accesses the system catalog constantly. Each time an SQL
statement is processed, the database server accesses the system catalog to
determine system privileges, add or verify table or column names, and so on.
For example, the following CREATE SCHEMA block adds the customer table,
with its indexes and privileges, to the stores_demo database. This block also
adds a view, california, which restricts the data of the customer table to only
the first and last names of the customer, the company name, and the
telephone number for all customers who reside in California.
CREATE SCHEMA AUTHORIZATION maryl
CREATE TABLE customer (customer_num SERIAL(101), fname CHAR(15),
lname CHAR(15), company CHAR(20), address1 CHAR(20), address2 CHAR(20),
city CHAR(15), state CHAR(2), zipcode CHAR(5), phone CHAR(18))
GRANT ALTER, ALL ON customer TO cathl WITH GRANT OPTION AS maryl
GRANT SELECT ON customer TO public
GRANT UPDATE (fname, lname, phone) ON customer TO nhowe
To process this CREATE SCHEMA block, the database server first accesses the
system catalog to verify the following information:
v The new table and view names do not already exist in the database. (If the
database is ANSI-compliant, the database server verifies that the new
names do not already exist for the specified owners.)
v The user has permission to create tables and grant user privileges.
v The column names in the CREATE VIEW and CREATE INDEX statements
exist in the customer table.
In addition to verifying this information and creating two new tables, the
database server adds new rows to the following system catalog tables:
v systables
v syscolumns
v sysviews
v systabauth
v syscolauth
v sysindexes
v sysindices (IDS)
The following two new rows of information are added to the systables system
catalog table after the CREATE SCHEMA block is run.
Each table recorded in the systables system catalog table is assigned a tabid, a
system-assigned sequential number that uniquely identifies each table in the
database. The system catalog tables receive 2-digit tabid numbers, and the
user-created tables receive sequential tabid numbers that begin with 100.
The CREATE SCHEMA block adds 14 rows to the syscolumns system catalog
table. These rows correspond to the columns in the table customer and the
view california, as the following example shows.
The colmin and colmax columns are empty. These columns contain values
when a column is the first key (or the only key) in an index, and has no
NULL or duplicate values, and the UPDATE STATISTICS statement has been
run.
The database server also adds rows to the sysviews system catalog table,
whose viewtext column contains each line of the CREATE VIEW statement
that defines the view. In that column, the x0 that precedes the column names
in the statement (for example, x0.fname) operates as an alias that
distinguishes among the same columns that are used in a self-join.
The CREATE SCHEMA block also adds rows to the systabauth system catalog
table. These rows correspond to the user privileges granted on customer and
california tables, as the following example shows.
The tabauth column specifies the table-level privileges granted to users on the
customer and california tables. This column uses an 8-byte pattern, such as s
(Select), u (Update), * (column-level privilege), i (Insert), d (Delete), x (Index),
a (Alter), and r (References), to identify the type of privilege. In this example,
the user nhowe has column-level privileges on the customer table. Where a
hyphen ( - ) appears, the user has not been granted the privilege whose
position the hyphen occupies within the tabauth value.
If the tabauth privilege code appears in uppercase (for example, S for Select),
the user has this privilege and can also grant it to others; but if the privilege
code is lowercase (for example, s for Select), the user cannot grant it to others.
In addition, three rows are added to the syscolauth system catalog table.
These rows correspond to the user privileges that are granted on specific
columns in the customer table, as the following example shows.
The colauth column specifies the column-level privileges that are granted on
the customer table. This column uses a 3-byte pattern, such as s (Select), u
(Update), and r (References), to identify the type of privilege. For example,
the user nhowe has Update privileges on the second column (because the
colno value is 2) of the customer table (indicated by tabid value of 101).
The CREATE SCHEMA block adds two rows to the sysindexes system catalog
table (the sysindices table for Dynamic Server). These rows correspond to the
indexes created on the customer table, as the following example shows.
In this table, the idxtype column identifies whether the created index requires
unique values (U) or accepts duplicate values (D). For example, the c_num_ix
index on the customer.customer_num column is unique.
Accessing the System Catalog
Normal user access to the system catalog is read-only. Users with Connect or
Resource privileges cannot alter the catalog, but they can access data in the
system catalog tables on a read-only basis using standard SELECT statements.
When you use DB–Access, only the tables that you created are displayed. To
display the system catalog tables, enter the following statement:
SELECT tabname, tabid FROM systables WHERE tabid < 100
You can use the SUBSTR or SUBSTRING function to select only part of a
source string. To display the list of tables in columns, enter the following
statement:
SELECT SUBSTR(tabname, 1, 18), tabid FROM systables
Although user informix and DBAs can modify most system catalog tables
(only user informix can modify systables), it is strongly recommended that
you do not update, delete, or insert any rows in them. Modifying system
catalog tables can destroy the integrity of the database. The ALTER TABLE
statement cannot modify the size of the next extent of system catalog tables.
If you use the UPDATE STATISTICS statement to update the system catalog
before executing a query, you can ensure that the information provided to the
optimizer is current. When you delete or modify a table, the database server
does not automatically update the related statistical data in the system
catalog. For example, if you delete one or more rows in a table with the
DELETE statement, the nrows column in the systables system catalog table,
which holds the number of rows for that table, is not updated automatically.
Whenever you modify a data table extensively, use the UPDATE STATISTICS
statement to update data in the system catalog. For more information on the
UPDATE STATISTICS statement, see the IBM Informix: Guide to SQL Syntax.
SYSAGGREGATES (IDS)
The sysaggregates system catalog table records user-defined aggregates
(UDAs). The sysaggregates table has the following columns.
Both a simple index on the aggid column and a composite index on the name
and owner columns require unique values.
SYSAMS (IDS)
The sysams system catalog table contains information that is needed to use
built-in access methods as well as those created by the CREATE ACCESS
METHOD statement of SQL that is described in the IBM Informix: Guide to
SQL Syntax. The sysams table has the following columns.
For each of the nearly 20 columns that follow am_costfactor, the value is the
sysprocedures.procid value for the corresponding routine.
SYSATTRTYPES (IDS)
The sysattrtypes system catalog table contains information about members of
a complex data type. Each row of sysattrtypes contains information about
elements of a collection data type or fields of a row data type.
Two indexes on the extended_id column and the xtd_type_id column allow
duplicate values. A composite index on the extended_id and seqno columns
allows only unique values.
SYSBLOBS
The sysblobs system catalog table specifies the storage location of BYTE and
TEXT column values. Its name is based on a legacy term for BYTE and TEXT
columns, blobs (also known as simple large objects), and does not refer to the
BLOB data type of Dynamic Server. The sysblobs table contains one row for
each BYTE or TEXT column, and has the following columns.
For information about the location and size of chunks of blobspaces, dbspaces,
and sbspaces for TEXT, BYTE, BLOB, and CLOB columns, see the
IBM Informix: Administrator's Guide and the IBM Informix: Administrator's
Reference.
SYSCASTS (IDS)
The syscasts system catalog table describes the casts in the database. It
contains one row for each built-in cast, each implicit cast, and each explicit
cast that a user defines. The syscasts table has the following columns.
If routine_name and routine_owner have NULL values, this indicates that the
cast is defined without a routine. This can occur if both of the data types
SYSCHECKS
The syschecks system catalog table describes each check constraint defined in
the database. Because the syschecks table stores both the ASCII text and a
binary encoded form of the check constraint, it contains multiple rows for
each check constraint. The syschecks table has the following columns.
The text in the checktext column associated with B type in the type column is
in computer-readable format. To view the text associated with a particular
check constraint, use the following query with the appropriate constrid code:
SELECT * FROM syschecks WHERE constrid=10 AND type=’T’
Each check constraint described in the syschecks table also has its own row in
the sysconstraints table.
A composite index on the constrid, type, and seqno columns allows only
unique values.
SYSCHECKUDRDEP (IDS)
The syscheckudrdep system catalog table describes each check constraint that
is referenced by a user-defined routine (UDR) in the database. The
syscheckudrdep table has the following columns.
SYSCOLATTRIBS (IDS)
The syscolattribs system catalog table describes the characteristics of smart
large objects, namely CLOB and BLOB data types. It contains one row for
each sbspace listed in the PUT clause of the CREATE TABLE statement.
SYSCOLAUTH
The syscolauth system catalog table describes each set of privileges granted
on a column. It contains one row for each set of column privileges granted in
the database. The syscolauth table has the following columns.
If the colauth privilege code is uppercase (for example, S for Select), a user
who has this privilege can also grant it to others. If the colauth privilege code
is lowercase (for example, s for Select), the user who has this privilege cannot
grant it to others. A hyphen ( - ) indicates the absence of the privilege
corresponding to that position within the colauth pattern.
A composite index on the tabid, grantor, grantee, and colno columns allows
only unique values. A composite index on the tabid and grantee columns
allows duplicate values.
SYSCOLDEPEND
The syscoldepend system catalog table tracks the table columns specified in
check and NOT NULL constraints. Because a check constraint can involve
more than one column in a table, the syscoldepend table can contain multiple
rows for each check constraint; one row is created for each column involved
in the constraint. The syscoldepend table has the following columns.
Extended Parallel Server does not support opaque data types, nor the
complex data types SET, MULTISET, LIST, unnamed and named ROW.
The coltype codes listed on the previous page can be incremented by bitmaps
showing the following features of the column.
Bit Value Significance When Bit Is Set
0x0100 NULL values are not allowed
For example, the coltype value 4118 for named row types is the decimal
representation of the hexadecimal value 0x1016, which is the same as the
hexadecimal coltype value for an unnamed row type (0 x 016), with the
named-row-type bit set. (The file $INFORMIXDIR/incl/esql/sqltypes.h
contains additional information about syscolumns.coltype codes.)
NOT NULL Constraints
Similarly, the coltype value is incremented by 256 if the column does not
allow NULL values. To determine the data type for such columns, subtract
256 from the value and evaluate the remainder, based on the possible coltype
values. For example, if the coltype value is 262, subtracting 256 leaves a
remainder of 6, indicating that the column has a SERIAL data type.
Storing the Column Data Type
The database server stores the coltype value as bitmap, as listed in
“SYSCOLUMNS” on page 1-22.
Opaque Data Types (IDS)
The BOOLEAN, BLOB, CLOB, and LVARCHAR data types are implemented
by the database server as built-in opaque data types.
A built-in opaque data type is one for which the database server provides the
type definition. Because these data types are built-in opaque types, they do
not have a unique coltype value. Instead, they have one of the coltype values
for opaque types: 41 (fixed-length opaque type), or 40 (varying-length opaque
type). The different fixed-length opaque types are distinguished by the
extended_id column in the sysxtdtypes system catalog table.
The following are the coltype values for the built-in opaque data types.
The length is the physical length of the DATETIME or INTERVAL field, and
first_qualifier and last_qualifier have values that the following table shows.
The colmin and colmax columns contain values only if the column is indexed
and you have run the UPDATE STATISTICS statement. If you store BYTE or
TEXT data in the tblspace, the colmin value is -1.
The colmin and colmax columns are valid only for data types that fit into
four bytes: SMALLFLOAT, SMALLINT, INTEGER, and the first four bytes of
CHAR. The values for all other noninteger column types are the initial four
bytes of the maximum or minimum value, which are treated as integers.
SYSCONSTRAINTS
The sysconstraints system catalog table lists the constraints placed on the
columns in each database table. An entry is also placed in the sysindexes
system catalog table (or sysindices view for Dynamic Server) for each unique,
primary key, NOT NULL, or referential constraint that does not already have
a corresponding entry in sysindexes or sysindices. Because indexes can be
shared, more than one constraint can be associated with an index. The
sysconstraints table has the following columns.
A composite index on the constrname and owner columns allows only unique
values. An index on the tabid column allows duplicate values, and an index
on the constrid column allows only unique values.
For check constraints (where constrtype = C), the idxname is always NULL.
Additional information about each check constraint is contained in the
syschecks and syscoldepend system catalog tables.
If you specify a literal for the default value, it is stored in the default column
as ASCII text. If the literal value is not of one of the data types listed in the
next paragraph, the default column consists of two parts. The first part is the
6-bit representation of the binary value of the default value structure. The
second part is the default value in ASCII text. A blank space separates the two
parts.
A composite index on the tabid, colno, and class columns allows only unique
values. (For Extended Parallel Server, this index omits the class column.)
SYSDEPEND
The sysdepend system catalog table describes how each view or table
depends on other views or tables. One row exists in this table for each
dependency, so a view based on three tables has three rows. The sysdepend
table has the following columns.
The btabid and dtabid columns are indexed and allow duplicate values.
SYSDIRECTIVES (IDS)
The sysdirectives table stores external optimizer directives that can be applied
to queries. Whether queries in client applications can use these optimizer
directives depends on the setting of the IFX_EXTDIRECTIVES environment
variable on the client system, as described in Chapter 3, and on the
EXT_DIRECTIVES setting in the configuration file of the database server.
NULL values are not valid in the query column. There is a unique index on
the id column.
SYSDISTRIB
The sysdistrib system catalog table stores data-distribution information for the
database server to use. Data distributions provide detailed table and column
information to the optimizer to improve the choice of execution paths of
SELECT statements. The sysdistrib table has the following columns.
Each row in the sysdistrib system catalog table is keyed by the tabid and
colno for which the statistics are collected.
For built-in data type columns, the type field is set to A. The encdat column
stores an ASCII-encoded histogram that is broken down into multiple rows,
each of which contains 256 bytes.
In Dynamic Server, for columns of user-defined data types, the type field is
set to S. The encdat column stores the statistics collected by the statcollect
user-defined routine in multirepresentational form. Only one row is stored for
each tabid and colno pair. A composite index on the tabid, colno, and seqno
columns requires unique combinations of values.
SYSERRORS (IDS)
The syserrors system catalog table stores information about error, warning,
and informational messages returned by DataBlade modules and user-defined
routines using the mi_db_error_raise( ) DataBlade API function.
To create a new message, insert a row directly into the syserrors table. By
default, all users can view this table, but only users with the DBA privilege
can modify it.
A composite index on the sqlstate, locale, level, and seqno columns allows
only unique values.
You can use the DBSCHEMA utility to write out the description of the
external tables. To query these system catalog tables about an external table,
use the tabid as stored in systables with tabtype = ‘E’.
SYSEXTDFILES (XPS)
For each external table, at least one row exists in the sysextdfiles system
catalog table, which has the following columns.
You can use DBSCHEMA to write out the description of the external tables. To
query these system catalog tables about an external table, use the tabid as
stored in systables with tabtype = ‘E’.
You can use DBSCHEMA to write out the description of the external tables. To
query these system catalog tables about an external table, use the tabid as
stored in systables with tabtype = ‘E’.
In the fragauth column, an uppercase code (such as U for Update) means that
the grantee can grant the privilege to other users; a lowercase (for example, u
for Update) means the user cannot grant the privilege to others. Hyphen ( - )
indicates the absence of the privilege for that position within the pattern.
The following example displays the fragment-level privileges for one base
table, as they appear in the sysfragauth table. In this example, the grantee ted
can grant the Update, Delete, and Insert privileges to other users.
SYSFRAGMENTS
The sysfragments system catalog table stores fragmentation information for
tables and indexes. One row exists for each table or index fragment.
The following query returns the owner and name for each of the duplicated
tables in the current database:
SELECT DISTINCT st.owner, st.tabname
FROM systables st, sysfragments sf
WHERE st.tabid = sf.tabid AND sf.fragtype = ’t’
The strategy type T is used for attached indexes. (This is a fragmented index
whose fragmentation is the same as the table fragmentation.)
SYSINDEXES
The sysindexes table is a view on the sysindices table. It contains one row for
each index in the database. The sysindexes table has the following columns.
As with most system catalog tables, changes that affect existing indexes are
reflected in this table only after you run the UPDATE STATISTICS statement.
Each part1 through part16 column in this table holds the column number
(colno) of one of the 16 possible parts of a composite index. If the component
is ordered in descending order, the colno is entered as a negative value. The
columns are filled in for B-tree indexes that do not use user-defined data
types or functional indexes. For generic B-trees and all other access methods,
the part1 through part16 columns all contain zeros.
The clust column is blank until the UPDATE STATISTICS statement is run on
the table. The maximum value is the number of rows in the table, and the
minimum value is the number of data pages in the table.
In Extended Parallel Server, the tabid column is indexed and allows duplicate
values. A composite index on the idxname, owner, and tabid columns allows
only unique values.
Tip: This system catalog table is changed from Version 7.2 of Informix
database servers. The earlier schema of this system catalog table is still
available as a view and can be accessed under its original name:
sysindexes.
Changes that affect existing indexes are reflected in this system catalog table
only after you run the UPDATE STATISTICS statement.
The tabid column is indexed and allows duplicate values. A composite index
on the idxname, owner, and tabid columns allows only unique values.
SYSINHERITS (IDS)
The sysinherits system catalog table stores information about table and
named ROW type inheritance. Every supertype, subtype, supertable, and
subtable in the database has a corresponding row in the sysinherits table.
The child and parent values are from sysxtdtypes.extended_id for named
ROW types, or from systables.tabid for tables. Simple indexes on the child
and parent columns allow duplicate values.
SYSLANGAUTH (IDS)
The syslangauth system catalog table contains the authorization information
on computer languages that are used to write user-defined routines (UDRs).
SYSLOGMAP (IDS)
The syslogmap system catalog table contains fragmentation information.
A simple index on the tabloc column and a composite index on the tabid and
fragid columns do not allow duplicate values.
SYSNEWDEPEND (XPS)
The sysnewdepend system catalog table contains information about
generalized-key indexes that are not available in the sysindexes table. The
dependencies between a generalized-key index and the tables in the FROM
clause of the CREATE INDEX statement are stored in the sysnewdepend
table, which has the following columns.
A composite index on the scrid1, scrid2, and type columns allows duplicate
values. Another composite index on the destid1, destid2, and type columns
also allows duplicate values.
Every index, trigger, and constraint in the database has a corresponding row
in the sysobjstate table if a user creates the object. Indexes that the database
server creates on the system catalog tables are not listed in the sysobjstate
table because their object mode cannot be changed.
A composite index on the objtype, name, owner, and tabid columns allows
only unique combinations of values. A simple index on the tabid column
allows duplicate values.
SYSOPCLASSES (IDS)
The sysopclasses system catalog table contains information about operator
classes associated with secondary access methods. It contains one row for each
operator class that has been defined in the database. The sysopclasses table
has the following columns.
The sysopclasses table has a composite index on the opclassname and owner
columns and an index on opclassid column. Both indexes allow only unique
values.
SYSOPCLSTR
The sysopclstr system catalog table defines each optical cluster in the
database. It contains one row for each optical cluster. The sysopclstr table has
the following columns.
A composite index on the clstrname and owner columns allows only unique
values. A simple index on the tabid column allows duplicate values.
A composite index on the procid, grantor, and grantee columns allows only
unique values. A composite index on the procid and grantee columns allows
duplicate values.
SYSPROCBODY
The sysprocbody system catalog table describes the compiled version of each
procedure or function in the database. Because the sysprocbody table stores
the text of the routine, each routine can have multiple rows. The sysprocbody
table has the following columns.
The data column contains actual data, which can be in one of these formats:
v Encoded return values list
v Encoded symbol table
A composite index on the procid, datakey, and seqno columns allows only
unique values.
SYSPROCEDURES
The sysprocedures system catalog table lists the characteristics for each
function and procedure in the database. It contains one row for each routine.
In the mode column, the R mode is a special case of the O mode. A routine is
in restricted (R) mode if it was created with a specified owner who is different
from the routine creator. If routine statements involving a remote database are
executed, the database server uses the permissions of the user who executes
the routine instead of the permissions of the routine owner. In all other
scenarios, R-mode routines behave the same as O-mode routines.
A database server can create protected SPL routines for internal use. These
protected SPL routines have p in the mode column. You cannot modify, drop,
nor display protected SPL routines.
The database server can create protected routines for internal use. The
sysprocedures table identifies these protected routines with the letter P or p in
the mode column. You cannot modify or drop protected routines, nor can you
display them through DBSCHEMA.
Before a routine is run, its dependency list in the data column is examined. If
the major version number of a table accessed by the plan has changed, or if
any object that the routine uses has been modified since the plan was
optimized (for example, if an index has been dropped), then the plan is
optimized again. When datakey is I, the data column stores information about
UPDATE STATISTICS and PDQPRIORITY.
It is possible to delete all the plans for a given routine by using the DELETE
statement on sysprocplan. When the routine is subsequently executed, new
plans are automatically generated and recorded in sysprocplan. The UPDATE
STATISTICS FOR PROCEDURE statement also updates this table.
A composite index on the procid, planid, datakey, and seqno columns allows
only unique values.
The constrid column is indexed and allows only unique values. The primary
column is indexed and allows duplicate values.
SYSREPOSITORY (XPS)
The sysrepository system catalog table contains data about generalized-key
indexes that the sysindexes system catalog table does not provide.
SYSROLEAUTH
The sysroleauth system catalog table describes the roles that are granted to
users. It contains one row for each role that is granted to a user in the
database. The sysroleauth table has the following columns.
The is_grantable column indicates whether the role was granted with the
WITH GRANT OPTION of the GRANT statement.
A composite index on the rolename and grantee columns allows only unique
values.
SYSROUTINELANGS (IDS)
The sysroutinelangs system catalog table lists the supported programming
languages for user-defined routines (UDRs). It has these columns.
SYSSYNONYMS
The syssynonyms system catalog table lists the synonyms for each table or
view. Except for database servers that have migrated from certain interim
releases of Version 1.10 Informix database servers, only the syssyntable table
describes synonyms, and the syssynonyms table is unused. It has the
following columns.
A composite index on the owner and synonym columns allows only unique
values. The tabid column is indexed and allows duplicate values.
SYSSYNTABLE
The syssyntable system catalog table outlines the mapping between each
public or private synonym and the database object (table, sequence, or view)
that it represents. It contains one row for each entry in the systables table that
has a tabtype value of Por S. The syssyntable table has the following
columns.
If you define a synonym for an object that is in your current database, only
the tabid and btabid columns are used. If you define a synonym for a table
that is external to your current database, the btabid column is not used, but
the tabid, servername, dbname, owner, and tabname columns are used.
The tabid column maps to systables.tabid. With the tabid information, you
can determine additional facts about the synonym from systables.
An index on the tabid column allows only unique values. The btabid column
is indexed to allow duplicate values.
SYSTABAMDATA (IDS)
The systabamdata system catalog table stores the table-specific hashing
parameters of tables that were created with a primary access method.
The am_space column specifies the location of the table. It might reside in a
cooked file, a different database, or an sbspace within the database server.
SYSTABAUTH
The systabauth system catalog table describes each set of privileges that are
granted on a table, view, sequence, or synonym. It contains one row for each
set of table privileges that are granted in the database; the REVOKE statement
can modify a row. The systabauth table has the following columns.
If the tabauth column shows a privilege code in uppercase (for example, S for
Select), this indicates that the user also has the option to grant that privilege
to others. Privilege codes listed in lowercase (for example, s for select)
indicate that the user has the specified privilege, but cannot grant it to others.
A composite index on tabid, grantor, and grantee allows only unique values.
A composite index on tabid and grantee allows duplicate values.
Each table, view, sequence, and synonym recorded in the systables table is
assigned a tabid, which is a system-assigned SERIAL value that uniquely
identifies the object. The first 99 tabid values are reserved for the system
catalog. The tabid of the first user-defined table object in a database is always
100.
The tabid column is indexed and contains only unique values. A composite
index on the tabname and owner columns also requires unique values.
The npused column does not reflect the number of pages used for BYTE or
TEXT data, nor the number of pages that are freed in DELETE operations.
SYSTRACECLASSES (IDS)
The systraceclasses system catalog table contains the names and identifiers of
trace classes. The systraceclasses table has the following columns.
A trace class is a category of trace messages that you can use in the
development and testing of new DataBlade modules and user-defined
routines. Developers use the tracing facility by calling the appropriate
DataBlade API routines within their code.
To create a new trace class, insert a row directly into the systraceclasses table.
By default, all users can view this table, but only users with the DBA privilege
can modify it.
A unique index on the name column requires each trace class to have a
unique name. The database server assigns to each class a unique sequential
code. The index on this classid column also allows only unique values.
SYSTRACEMSGS (IDS)
The systracemsgs system catalog table stores internationalized trace messages
that you can use in debugging user-defined routines.
To create a trace message, you must specify its name, locale, and text. By
default, all users can view the systracemsgs table, but only users with the
DBA privilege can modify it.
SYSTRIGBODY
The systrigbody system catalog table contains the ASCII text of the trigger
definition and the linearized code for the trigger. Linearized code is binary data
and code that is represented in ASCII format.
Important: The database server uses the linearized code that is stored in
systrigbody. You must not alter the content of rows that contain
linearized code.
A composite index on the trigid, datakey, and seqno columns allows only
unique values.
SYSTRIGGERS
The systriggers system catalog table contains information about the SQL
triggers in the database. This information includes the triggering event and
the correlated reference specification for the trigger. The systriggers table has
the following columns.
SYSUSERS
The sysusers system catalog table describes each set of privileges that are
granted on the database. It contains one row for each user or role that has
privileges on the database. This system catalog table has the following
columns.
An index on username allows only unique values. The username value can
be the login name of a user or the name of a role.
SYSVIEWS
The sysviews system catalog table describes each view in the database.
Because it stores the SELECT statement that created the view, sysviews can
contain multiple rows for each view. It has the following columns.
The maxrows column also signifies the maximum number of rows that can be
inserted in the diagnostics table during a single operation that enables a
disabled object or that sets a disabled object to filtering mode (provided that a
diagnostics table exists for the target table). If no maximum is specified for the
diagnostics or violations table, then maxrows contains a NULL value.
Extended Parallel Server does not use the diagnostic table when a constraint
violation occurs. Rather, the database server stores additional information in
the violations table. The violations table contains the data that the transaction
refused and an indication of the cause.
The primary key of this table is the targettid column. An additional unique
index is also defined on the viotid column.
SYSXTDTYPEAUTH (IDS)
The sysxtdtypeauth system catalog table identifies the privileges for each
UDT (user-defined data type). The sysxtdtypeauth table contains one row for
each set of privileges granted and has the following columns.
If the privilege code in the auth column is uppercase (for example, ’U’ for
usage), a user who has this privilege can also grant it to others. If the code is
in lowercase, a user who has the privilege cannot grant it to others.
A composite index on type, grantor, and grantee allows only unique values.
A composite index on the type and grantee columns allows duplicate values.
SYSXTDTYPES (IDS)
The sysxtdtype system catalog table has an entry for each UDT (user-defined
data type), including opaque and distinct data types and complex data types
(named ROW type, unnamed ROW type, and COLLECTION type), that is
defined in the database. The sysxtdtypes table has the following columns.
For distinct types created from built-in data types, the type column codes
correspond to the value of the syscolumns.coltype column (indicating the
source type) as listed on page 1-22, but incremented by the hexadecimal value
0x0000800. The file $INFORMIXDIR/incl/esql/sqltypes.h contains information
about sysxtdtypes.type and syscolumns.coltype codes.
Sections that follow contain information about how to generate and access
Information Schema views as well as information about their structure.
Generating the Information Schema Views
The Information Schema views are generated automatically when you, as
DBA, run the following DB–Access command:
dbaccess database-name $INFORMIXDIR/etc/xpg4_is.sql
The views display data from the system catalog tables. If tables, views, or
routines exist with any of the same names as the Information Schema views,
you must either rename those database objects or rename the views in the
script before you can install the views. You can drop the views with the
DROP VIEW statement on each view. To re-create the views, rerun the script.
You can query the Information Schema views as you would query any other
table or view in the database.
Structure of the Information Schema Views
The following Information Schema views are described in this section:
v tables
v columns
v sql_languages
v server_info
In order to accept long identifier names, most of the columns in the views are
defined as VARCHAR data types with large maximum sizes.
The visible rows in the tables view depend on your privileges. For example, if
you have one or more privileges on a table (such as Insert, Delete, Select,
References, Alter, Index, or Update on one or more columns), or if privileges
are granted to PUBLIC, you see the row that describes that table.
server_attribute Explanation
identifier_length Maximum number of bytes for a user-defined identifier
row_length Maximum number of bytes in a row
userid_length Maximum number of bytes in a user name
txn_isolation Initial transaction isolation level for the database server:
In This Chapter
Every column in a table in a database is assigned a data type. The data type
precisely defines the kinds of values that you can store in that column.
This chapter describes built-in and extended data types, casting between two
data types, and operator precedence.
Data types
Numeric Large-object
Built-in data types (which are system-defined) and extended data types (which
you can define) share the following characteristics. You can:
v Use them to create columns within database tables.
v Declare them as arguments and as returned types of routines.
v Use them as base types from which to create DISTINCT data types.
v Cast them to other data types.
v Declare and access host variables of these types in SPL and ESQL/C.
For exceptions, see the description of each data type. For an overview, see
“Built-In Data Types” on page 2-38 and “Extended Data Types (IDS)” on page
2-46.
You assign data types to columns with the CREATE TABLE statement and
change them with the ALTER TABLE statement. When you change an existing
column data type, all data is converted to the new data type, if possible.
For information about how to create and use complex data types of Dynamic
Server, see the IBM Informix: Database Design and Implementation Guide. For
information about how to create user-defined data types, see IBM Informix:
User-Defined Routines and Data Types Developer's Guide.
All Informix database servers support the data types that Table 2-1 lists. This
chapter describes each of these built-in data types.
Table 2-1. Data Types That All Informix Database Servers Support
Data Type Explanation Page
BIGINT Is a synonym (in XPS only) for INT8 2-19
31
BYTE Stores any kind of binary data, up to 2 bytes in length 2-7
CHAR(n) Stores character strings; collation is in code-set order 2-8
CHARACTER(n) Is a synonym for CHAR 2-9
CHARACTER Stores character strings of varying length 2-9
VARYING(m,r) (ANSI compliant); collation is in code-set order
DATE Stores calendar dates 2-11
DATETIME Stores calendar date combined with time of day 2-11
For the character data types (CHAR, CHAR VARYING, LVARCHAR, NCHAR,
NVARCHAR, and VARCHAR), a data string can include letters, digits,
punctuation, whitespace, diacritical marks, ligatures, and other printable
Dynamic Server also supports additional data types that Table 2-2 lists.
Table 2-2. Additional Data Types That Dynamic Server Supports
Data Type Explanation Page
BLOB Stores binary data in random-access chunks 2-6
BOOLEAN Stores Boolean values true and false 2-7
CLOB Stores text data in random-access chunks 2-10
Distinct Stores data in a user-defined type that has the same 2-17
format as a source type on which it is based, but its casts
and functions can differ from those on the source type
LIST(e) Stores a sequentially ordered collection of elements, all of 2-22
the same data type, e; allows duplicate values
LVARCHAR(m) Stores variable-length strings of up to 32,739 bytes 2-23
MULTISET(e) Stores a non-ordered collection of values, with elements 2-25
all of the same data type, e; allows duplicate values.
Opaque Stores a user-defined data type whose internal structure is 2-26
inaccessible to the database server
ROW, Named Stores a named ROW type 2-27
ROW, Unnamed Stores an unnamed ROW type 2-28
SET(e) Stores a non-ordered collection of elements, all of the 2-32
same data type, e; does not allow duplicate values
Distributed DML operations and function calls that access databases of other
database servers cannot return these extended data types of Dynamic Server,
which are individually described in this chapter. (Cross-database operations
on other databases of the same Dynamic Server instance, however, can access
BOOLEAN, BLOB, CLOB, and LVARCHAR data types, which are
implemented as built-in opaque types. Such operations can also access
DISTINCT types whose base types are built-in types, and user-defined types
(UDTs), if the UDTs and DISTINCT types are explicitly cast to built-in types,
and if all of the UDTs, casts, and DISTINCT types are defined in all the
participating databases.)
For information about Informix internal data types that SQL statements
support (such as IMPEX, IMPEXBIN, and SENDRECV), see IBM Informix:
User-Defined Routines and Data Types Developer's Guide.
The term smart large object refers to BLOB and CLOB data types. Use CLOB
data types (see page 2-10) for random access to text data. For general
information about BLOB and CLOB data types, see “Smart Large Objects
(IDS)” on page 2-39.
You can use these SQL functions to perform operations on a BLOB column:
v FILETOBLOB copies a file into a BLOB column.
v LOTOFILE copies a BLOB (or CLOB) value into an operating-system file.
v LOCOPY copies an existing smart large object to a new smart large object.
For more information on these SQL functions, see the IBM Informix: Guide to
SQL Syntax.
Within SQL, you are limited to the equality ( = ) comparison operation and
the encryption and decryption functions for BLOB data. (The encryption and
decryption functions are described in the IBM Informix: Guide to SQL Syntax.)
To perform additional operations, you must use one of the application
programming interfaces (APIs) from within your client application.
You can insert data into BLOB columns in the following ways:
v With the dbload or onload utilities
v With the LOAD statement (DB–Access)
v With the FILETOBLOB function
v From BLOB (ifx_lo_t) host variables (IBM Informix ESQL/C)
If you select a BLOB column using DB–Access, only the string <SBlob value>
is returned; no actual value is displayed.
You can compare two BOOLEAN values to test for equality or inequality. You
can also compare a BOOLEAN value to the Boolean literals ’t’ and ’f’.
BOOLEAN values are case insensitive; ’t’ is equivalent to ’T’ and ’f’ to ’F’.
You can use a BOOLEAN column to store what a Boolean expression returns.
In the following example, the value of boolean_column is ’t’ if column1 is
less than column2, ’f’ if column1 is greater than or equal to column2, and
NULL if the value of either column1 or column2 is unknown:
UPDATE my_table SET boolean_column = lessthan(column1, column2)
BYTE
The BYTE data type stores any kind of binary data in an undifferentiated byte
stream. Binary data typically consists of digitized information, such as
spreadsheets, program load modules, digitized voice patterns, and so on. The
term simple large object refers to BYTE and text data types. No more than 195
columns of the same table can be declared as BYTE and text data types.
The BYTE data type has no maximum size. A BYTE column has a theoretical
limit of 231 bytes and a practical limit that your disk capacity determines.
You can store, retrieve, update, or delete the contents of a BYTE column. You
cannot, however, use BYTE operands in arithmetic or string operations, nor
assign literals to BYTE columns with the SET clause of the UPDATE
statement. You also cannot use BYTE items in any of the following ways:
v With aggregate functions
v With the IN clause
v With the MATCHES or LIKE clauses
v With the GROUP BY clause
v With the ORDER BY clause
BYTE operands are valid in Boolean expressions only when you are testing for
NULL values with the IS NULL or IS NOT NULL operators.
You cannot use a quoted text string, number, or any other actual value to
insert or update BYTE columns.
When you select a BYTE column, you can choose to receive all or part of it.
To retrieve it all, use the regular syntax for selecting a column. You can also
select any part of a BYTE column by using subscripts, as the next example,
which reads the first 75 bytes of the cat_picture column associated with the
catalog number 10001:
SELECT cat_picture [1,75] FROM catalog WHERE catalog_num = 10001
A built-in cast converts BYTE values to BLOB values. For more information,
see the IBM Informix: Database Design and Implementation Guide.
If you select a BYTE column using the DB–Access Interactive Schema Editor,
only the string ’’<BYTE value>’’ is returned; no data value is displayed.
For multibyte locales, the database supports any multibyte characters in the
code set. When storing multibyte characters in a CHAR data type, make sure
to calculate the number of bytes needed. For more information on multibyte
characters and locales, see the IBM Informix: GLS User's Guide.
CHAR values are compared to other CHAR values by padding the shorter
value on the right with blank spaces until the values have equal length, and
then comparing the two values, using the code-set order for collation.
The term smart large object refers to CLOB and BLOB data types. The CLOB
data type supports special operations for character strings that are
inappropriate for BLOB values. A CLOB value can be up to 4 terabytes (4*240
bytes) in length.
Use the BLOB data type (see “BLOB (IDS)” on page 2-6) for random access to
binary data. For general information about the CLOB and BLOB data types,
see “Smart Large Objects (IDS)” on page 2-39.
For more information on these SQL functions, see the IBM Informix: Guide to
SQL Syntax.
No casts exist for CLOB data. Therefore, the database server cannot convert
data of the CLOB type to any other data type, except by using these
encryption and decryption functions to return a BLOB. Within SQL, you are
limited to the equality ( = ) comparison operation for CLOB data. To perform
additional operations, you must use one of the application programming
interfaces from within your client application.
For examples of CLOB types, see the IBM Informix: Guide to SQL Tutorial and
the IBM Informix: Database Design and Implementation Guide.
Because DATE values are stored as integers, you can use them in arithmetic
expressions. For example, you can subtract a DATE value from another DATE
value. The result, a positive or negative INTEGER value, indicates the number
of days that elapsed between the two dates. (You can use a UNITS DAY
expression to convert the result to an INTERVAL DAY TO DAY data type.)
The following example shows the default display format of a DATE column:
mm/dd/yyyy
In this example, mm is the month (1-12), dd is the day of the month (1-31), and
yyyy is the year (0001-9999). You can specify a different order of time units
and a different time-unit separator than / (or no separator) by setting the
DBDATE environment variable. For more information, see “DBDATE” on
page 3-25.
The declaration of a DATETIME column need not include the full YEAR to
FRACTION range of time units. It can include any contiguous subset of these
time units, or even only a single time unit.
For example, you can enter a MONTH TO HOUR value in a column declared
as YEAR TO MINUTE, as long as each entered value contains information for
If you use the DB–Access TABLE menu, and you do not specify the
DATETIME qualifiers, a default DATETIME qualifier, YEAR TO YEAR, is
assigned.
A valid DATETIME literal must include the DATETIME keyword, the values
to be entered, and the field qualifiers. You must include these qualifiers
because, as noted earlier, the value that you enter can contain fewer fields
than were declared for that column. Acceptable qualifiers for the first and last
fields are identical to the list of valid DATETIME fields that Table 2-3 on page
2-12 lists.
Write values for the field qualifiers as integers and separate them with
delimiters. Table 2-4 lists the delimiters that are used with DATETIME values
in the default U.S. English locale. (These are a superset of the delimiters that
are used in INTERVAL values; see Table 2-6 on page 2-21.)
Table 2-4. Delimiters Used with DATETIME
Delimiter Placement in DATETIME Literal
Hyphen ( - ) Between the YEAR, MONTH, and DAY time-unit values
Blank space ( ) Between the DAY and HOUR time-unit values
Colon ( : ) Between the HOUR, MINUTE, and SECOND time-unit values
Decimal point ( . ) Between the SECOND and FRACTION time-unit values
2003-09-23 12:42:06.001
When you enter a value with fewer time-unit fields than in the column, the
value that you enter is expanded automatically to fill all the declared
time-unit fields. If you leave out any more significant fields, that is, time units
larger than any that you include, those fields are filled automatically with the
You can also enter DATETIME values as character strings. The character string
must include information for each field defined in the DATETIME column.
The INSERT statement in the following example shows a DATETIME value
entered as a character string:
INSERT INTO cust_calls (customer_num, call_dtime, user_id,
call_code, call_descr)
VALUES (101, ’2001-01-14 08:45’, ’maryj’, ’D’,
’Order late - placed 6/1/00’)
If the character string does not contain information for all the declared fields
(or if it adds additional fields), then the database server returns an error.
All fields of a DATETIME column are two-digit numbers except for the year
and fraction fields. The year field is stored as four digits. When you enter a
two-digit value in the year field, how the abbreviated year is expanded to
four digits depends on the setting of the DBCENTURY environment variable.
For example, if you enter 02 as the year value, whether the year is interpreted
as 1902, 2002, or 2102 depends on the setting of DBCENTURY and on the
value of the system clock calendar at execution time. If you do not set
DBCENTURY, then the leading digits of the current year are appended by
default. For information about setting DBCENTURY, see “DBCENTURY” on
page 3-22.
For example, a YEAR TO DAY qualifier requires a total of eight digits (four
for year, two for month, and two for day). According to the formula, this data
value requires 5, or (8/2) + 1, bytes of storage.
With an ESQL API, the DBTIME environment variable also affects DATETIME
formatting. Non-default locales and settings of the GL_DATE and DBDATE
environment variables also affect the display of datetime data. They do not,
however, affect the internal storage format of a DATETIME column.
For more information on DBTIME, see “DBTIME” on page 3-39. For more
information on DBCENTURY, see “DBCENTURY” on page 3-22. For more
information on locales and GLS environment variables that can specify
end-user DATETIME formats, see the IBM Informix: GLS User's Guide.
DEC
The DEC data type is a synonym for DECIMAL.
DECIMAL
The DECIMAL data type can take two forms: DECIMAL(p) floating point and
DECIMAL(p,s) fixed point. In an ANSI-compliant database, however, all
DECIMAL numbers are fixed point. By default, literal numbers that include a
decimal ( . ) point are interpreted by the database server as DECIMAL values.
All numbers with an absolute value less than 0.5 * 10-s have the value zero.
The largest absolute value of a DECIMAL(p,s) data type that you can store
without an overflow error is 10p-s -10-s. A DECIMAL column typically stores
numbers with fractional parts that must be stored and displayed exactly (for
example, rates or percentages). In an ANSI-compliant database, all DECIMAL
numbers must have absolute values in the range 10-32 to 10+31.
DECIMAL Storage
The database server uses one byte of disk storage to store two digits of a
decimal number, plus an additional byte to store the exponent and sign, with
the first byte representing a sign bit and a 7-bit exponent in excess-65 format.
The rest of the bytes express the mantissa as base-100 digits. The significant
digits to the left of the decimal and the significant digits to the right of the
decimal are stored in separate groups of bytes. At the maximum precision
specification, DECIMAL(32,s) data types can store s-1 decimal digits to the
right of the decimal point, if s is an odd number.
(The exponent byte is not shown.) With the additional byte required for the
exponent and sign, DECIMAL(6,3) requires a total of 5 bytes of storage.
Figure 2-3. Schematic That Illustrates the Storage of Digits in a Decimal (p,s) Value
You can use the following formulas (rounded down to a whole number of
bytes) to calculate the byte storage (N) for a DECIMAL(p,s) data type (where
N includes the byte that is required to store the exponent and the sign):
If the scale is odd: N = (precision + 4) / 2
If the scale is even: N = (precision + 3) / 2
For example, the data type DECIMAL(5,3) requires 4 bytes of storage (9/2
rounded down equals 4).
There is one caveat to these formulas. The maximum number of bytes the
database server uses to store a decimal value is 17. One byte is used to store
the exponent and sign, leaving 16 bytes to store up to 32 digits of precision. If
you specify a precision of 32 and an odd scale, however, you lose 1 digit of
precision. Consider, for example, the data type DECIMAL(32,31). This decimal
is defined as 1 digit to the left of the decimal and 31 digits to the right. The 1
digit to the left of the decimal requires 1 byte of storage. This leaves only 15
bytes of storage for the digits to the right of the decimal. The 15 bytes can
accommodate only 30 digits, so 1 digit of precision is lost.
Distinct (IDS)
A distinct type is a data type that is derived from one of the following source
types (called the base type):
v A built-in type
v An existing distinct type
v An existing named ROW type
v An existing opaque type
A distinct type inherits from its source type the length and alignment on the
disk. A distinct type thus makes efficient use of the preexisting functionality
of the database server.
A distinct type cannot be compared directly to its source type. To compare the
two types, you must first explicitly cast one type to the other.
You must define a distinct type in the database. Definitions of distinct types
are stored in the sysxtdtypes system catalog table. The following SQL
statements maintain the definitions of distinct types in the database:
v The CREATE DISTINCT TYPE statement adds a distinct type to the
database.
v The DROP TYPE statement removes a previously defined distinct type from
the database.
For more information about the SQL statements mentioned above, see the
IBM Informix: Guide to SQL Syntax. For information about casting distinct data
types, see “Casts for Distinct Types” on page 2-54. For examples that show
how to create and register cast functions for a distinct type, see the
IBM Informix: Database Design and Implementation Guide.
DOUBLE PRECISION
The DOUBLE PRECISION keywords are a synonym for the FLOAT keyword.
FLOAT(n)
The FLOAT data type stores double-precision floating-point numbers with up
to 17 significant digits. FLOAT corresponds to IEEE 4-byte floating-point, and
to the double data type in C. The range of values for the FLOAT data type is
the same as the range of the C double data type on your computer.
You can use n to specify the precision of a FLOAT data type, but SQL ignores
the precision. The value n must be a whole number between 1 and 14.
A column with the FLOAT data type typically stores scientific numbers that
can be calculated only approximately. Because floating-point numbers retain
only their most significant digits, the number that you enter in this type of
column and the number the database server displays can differ slightly.
The difference between the two values depends on how your computer stores
floating-point numbers internally. For example, you might enter a value of
1.1000001 into a FLOAT field and, after processing the SQL statement, the
database server might display this value as 1.1. This situation occurs when a
FLOAT data types usually require 8 bytes of storage per value. Conversion of
a FLOAT value to a DECIMAL value results in 17 digits of precision.
INT
The INT data type is a synonym for INTEGER.
INT8
The INT8 data type stores whole numbers that can range in value from
–9,223,372,036,854,775,807 to 9,223,372,036,854,775,807 [or -(263-1) to 263-1], for
18 or 19 digits of precision. The number –9,223,372,036,854,775,808 is a
reserved value that cannot be used. The INT8 data type is typically used to
store large counts, quantities, and so on.
Dynamic Server stores INT8 data in internal format that can require up to 10
bytes of storage. Extended Parallel Server stores INT8 values as 8 bytes.
Here the largest_qualifier and smallest_qualifier keywords are taken from one of
the two INTERVAL classes, as shown in Table 2-5 on page 2-20.
As with DATETIME data types, you can define an INTERVAL to include only
the subset of time units that you need. But because the construct of “month”
(as used in calendar dates) is not a time unit that has a fixed number of days,
a single INTERVAL value cannot combine months and days; arithmetic that
involves operands of the two different INTERVAL classes is not supported.
A value entered into an INTERVAL column need not include the full range of
time units that were specified in the data-type declaration of the column. For
example, you can enter a value of HOUR TO SECOND precision into a
column defined as DAY TO SECOND. A value must always consist, however,
When you enter a value in an INTERVAL column, you must specify the
largest and smallest fields in the value, just as you do for DATETIME values.
In addition, you can optionally specify the precision of the first field (and the
scale of the last field if it is a FRACTION). If the largest and smallest field
qualifiers are both FRACTION, you can specify only the scale in the last field.
Acceptable qualifiers for the largest and smallest fields are identical to the list
of INTERVAL fields that Table 2-5 on page 2-20 displays.
If you use the DB–Access TABLE menu, but you specify no INTERVAL field
qualifiers, then a default INTERVAL qualifier, YEAR TO YEAR, is assigned.
INTERVAL literals use the same delimiters as DATETIME literals (except that
MONTH and DAY time units are not valid within the same INTERVAL
value). Table 2-6 shows the INTERVAL delimiters.
Table 2-6. INTERVAL Delimiters
Delimiter Placement in an INTERVAL Literal
Hyphen Between the YEAR and MONTH portions of the value
Blank space Between the DAY and HOUR portions of the value
Colon Between the HOUR, MINUTE, and SECOND portions of the value
Decimal point Between the SECOND and FRACTION portions of the value
You can also enter INTERVAL values as character strings. The character string
must include information for the same time units that were specified in the
data-type declaration for the column. The INSERT statement in the following
example shows an INTERVAL value entered as a character string:
For example, INTERVAL YEAR TO MONTH requires six digits (four for year
and two for month), and requires 4, or (6/2) + 1, bytes of storage.
No more than 97 columns of the same table can be declared as LIST data
types. (The same restriction applies to SET and MULTISET collection types.)
By default, the database server inserts LIST elements at the end of the list. To
support the ordinal position of a LIST, the INSERT statement provides the AT
clause. This clause allows you to specify the position at which you want to
insert a list-element value. For more information, see the INSERT statement in
the IBM Informix: Guide to SQL Syntax.
All elements in a LIST have the same element type. To specify the element
type, use the following syntax:
LIST(element_type NOT NULL)
You must specify the NOT NULL constraint for LIST elements. No other
constraints are valid for LIST columns. For more information on the syntax of
the LIST data type, see the IBM Informix: Guide to SQL Syntax.
You can use LIST where any other data type is valid. For example:
v After the IN predicate in the WHERE clause of a SELECT statement to
search for matching LIST values
v As an argument to the CARDINALITY or mi_collection_card( ) function to
determine the number of elements in a LIST column
Two list values are equal if they have the same elements in the same order.
The following examples both are list values but are not equal:
LIST{"blue", "green", "yellow"}
LIST{"yellow", "blue", "green"}
The above statements are not equal because the values are not in the same
order. To be equal, the second statement would have to be:
LIST{"blue", "green", "yellow"}
LVARCHAR(m) (IDS)
You can use the LVARCHAR data type to create a column for storing
variable-length character strings whose upper limit (m) can be up to 32,739
bytes. (You can use the VARCHAR data type for strings no longer than 255
bytes.)
The LVARCHAR data type stores opaque data types in the string (external)
format. Each opaque type has an input support function and cast, which
convert it from LVARCHAR to a form that database servers can manipulate.
Each opaque type also has an output support function and cast, which
convert it from its internal representation to LVARCHAR.
Unlike the DECIMAL data type, the MONEY data type is always treated as a
fixed-point decimal number. The database server defines the data type
MONEY(p) as DECIMAL(p,2). If the precision and scale are not specified, the
database server defines a MONEY column as DECIMAL(16,2).
You can use the following formula (rounded down to a whole number of
bytes) to calculate the byte storage for a MONEY data type:
If the scale is odd: N = (precision + 4) / 2
If the scale is even: N = (precision + 3) / 2
In the default locale, client applications format values from MONEY columns
with the following currency notation:
v A currency symbol: a dollar sign ( $ ) at the front of the value
v A thousands separator: a comma ( , ) that separates every three digits in the
integer part of the value
v A decimal point: a period ( . ) between the integer and fractional parts of
the value
All elements in a MULTISET have the same element type. To specify the
element type, use the following syntax:
MULTISET(element_type NOT NULL)
You can use MULTISET anywhere that you use any other data type, unless
otherwise indicated. For example:
v After the IN predicate in the WHERE clause of a SELECT statement to
search for matching MULTISET values
v As an argument to the CARDINALITY or mi_collection_card( ) function to
determine the number of elements in a MULTISET column
You must specify the NOT NULL constraint for MULTISET elements. No
other constraints are valid for MULTISET columns. For more information on
the MULTISET collection type, see the IBM Informix: Guide to SQL Syntax.
Two multiset data values are equal if they have the same elements, even if the
elements are in different positions within the set. The following examples are
both multiset values but are not equal:
The collation order of the CHAR data type follows the code-set order, but the
collating order of the NCHAR data type can be a localized order, if
DB_LOCALE (or SET COLLATION) specifies a localized collation. For more
information about NCHAR, see the description of “DBNLS (IDS)” on page
3-32.
NUMERIC(p,s)
The NUMERIC data type is a synonym for fixed-point DECIMAL.
NVARCHAR(m,r)
The NVARCHAR data type stores strings of varying lengths. The string can
include digits, symbols, and single-byte and (in some locales) multibyte
characters. The main difference between VARCHAR and NVARCHAR data
types is the collation order. Collation of VARCHAR data follows code-set
order, but NVARCHAR collation can be locale specific, if DB_LOCALE (or
SET COLLATION) has specified a localized collation. (The section “Collating
VARCHAR Values” on page 2-37 describes an exception.)
No more than 195 columns of the same table can be NVARCHAR data types.
Opaque (IDS)
An opaque type is a data type for which you must provide the following
information to the database server:
v A data structure for how the data values are stored on disk
The internal structure of an opaque type is not visible to the database server
and can only be accessed through user-defined routines. Definitions for
opaque types are stored in the sysxtdtypes system catalog table. These SQL
statements maintain the definitions of opaque types in the database:
v The CREATE OPAQUE TYPE statement registers a new opaque type in the
database.
v The DROP TYPE statement removes a previously defined opaque type from
the database.
The fields of a ROW data type can be any built-in data type or UDT, but
TEXT or BYTE fields of a ROW type are valid in typed tables only. If you
want to assign a ROW type to a column, its elements cannot be TEXT or
BYTE data types.
In general, the data type of a field of a ROW type can be any of these types:
v A built-in type (except for the TEXT or BYTE data types)
v A collection type (LIST, MULTISET, or SET)
v A distinct type
These SQL statements maintain the definitions of named ROW data types:
v The CREATE ROW TYPE statement adds a named ROW type to the
database.
v The DROP ROW TYPE statement removes a previously defined named
ROW type from the database.
No more than 195 columns of the same table can be named ROW types.
For details about these SQL syntax statements, see the IBM Informix: Guide to
SQL Syntax. For examples of how to create and use named ROW types, see
the IBM Informix: Database Design and Implementation Guide.
Typed Tables
Tables that are part of an inheritance hierarchy must be typed tables. Typed
tables are tables that have been assigned a named ROW type. For the syntax
you use to create typed tables, see the CREATE TABLE statement in the
IBM Informix: Guide to SQL Syntax. Table inheritance and its relation to type
inheritance is also discussed in that section. For information about how to
create and use typed tables, see the IBM Informix: Database Design and
Implementation Guide.
ROW, Unnamed (IDS)
An unnamed ROW type contains fields but has no user-declared name. An
unnamed ROW type is defined by its structure. Two unnamed ROW types are
equal if they have the same structure (meaning the ordered list of the data
types of the fields). If two unnamed ROW types have the same number of
The following ROW types have the same number of fields and the same data
types, but are not equal, because their fields are not in the same order:
ROW (x integer, y varchar(20), z real)
ROW (x integer, z real, y varchar(20))
A field of an unnamed ROW type can be any of the following data types:
v A built-in type
v A collection type
v A distinct type
v Another ROW type
v An opaque type
No more than 195 columns of the same table can be unnamed ROW types.
You can specify a ROW column in the IN predicate in the WHERE clause of a
SELECT statement to search for matching ROW values. For more information,
see the Condition section in the IBM Informix: Guide to SQL Syntax.
SERIAL(n)
The SERIAL data type stores a sequential integer, in the positive range of the
INT8 data type, that is automatically assigned by the database server when a
new row is inserted. A table can have no more than one SERIAL column, but
it can have one SERIAL and one SERIAL8 column.
SERIAL values in a column are not automatically unique. You must apply a
unique index or primary key constraint to this column to prevent duplicate
serial numbers. If you use the interactive schema editor in DB–Access to
define the table, a unique index is applied automatically to a SERIAL column.
The DEFINE variable LIKE column syntax of SPL for indirect typing declares a
variable of the INTEGER data type if column is a SERIAL data type.
The default serial starting number is 1, but you can assign a non-default
initial value, n, when you create or alter the table. Any number greater than 0
can be your starting number. The maximum SERIAL is 2,147,483,647. If you
assign a number greater than 2,147,483,647, you receive a syntax error. (Use
the SERIAL8 data type, rather than SERIAL, if you need a larger range.)
A SERIAL column can store unique codes (for example, order, invoice, or
customer numbers). SERIAL data values require four bytes of storage, and
have the same precision as the INTEGER data type. For details of another
way to assign unique whole numbers to each row of a database table, see the
CREATE SEQUENCE statement in IBM Informix: Guide to SQL Syntax.
SERIAL8(n)
The SERIAL8 data type stores a sequential integer, in the positive range of the
INT8 data type, that is assigned automatically by the database server when a
new row is inserted. It behaves like the SERIAL data type, but with a larger
range. (For more information on how to insert values into SERIAL8 columns,
see the IBM Informix: Guide to SQL Syntax.)
The DEFINE variable LIKE column syntax of SPL for indirect typing declares a
variable of the INT8 data type if column is a SERIAL8 data type.
When you insert a number into a SERIAL8 column or reset the next value of a
SERIAL8 column, your database server assigns the next number in sequence
to the number entered. If you reset the next value of a SERIAL8 column to a
value that is less than the values already in that column, however, the next
value is computed using the following formula:
maximum existing value in SERIAL8 column + 1
For example, if you reset the SERIAL8 value of the customer_num column in
the customer table to 50, when the highest-assigned customer number is 128,
the next customer number assigned is 129.
No more than 97 columns of the same table can be declared as SET data
types. (The same restriction also applies to MULTISET and LIST collection
types.)
You must specify the NOT NULL constraint for SET elements. No other
constraints are valid for SET columns. For more information on the syntax of
the SET collection type, see the IBM Informix: Guide to SQL Syntax.
You can use SET anywhere that you use any other data type, unless otherwise
indicated. For example:
v After the IN predicate in the WHERE clause of a SELECT statement to
search for matching SET values
v As an argument to the CARDINALITY or mi_collection_card( ) function to
determine the number of elements in a SET column
SET values are not valid as arguments to an aggregate function such as AVG,
MAX, MIN, or SUM. For more information, see the Condition and Expression
sections in the IBM Informix: Guide to SQL Syntax.
The following examples declare two sets. The first statement declares a set of
integers and the second declares a set of character elements.
SET(INTEGER NOT NULL)
SET(CHAR(20) NOT NULL)
The following examples construct the same sets from value lists:
SET{1, 5, 13}
SET{"Oakland", "Menlo Park", "Portland", "Lenexa"}
SMALLFLOAT
The SMALLFLOAT data type stores single-precision floating-point numbers
with approximately nine significant digits. SMALLFLOAT corresponds to the
A SMALLFLOAT data type column typically stores scientific numbers that can
be calculated only approximately. Because floating-point numbers retain only
their most significant digits, the number that you enter in this type of column
and the number the database displays might differ slightly depending on how
your computer stores floating-point numbers internally.
Integer columns typically store counts, quantities, and so on. Because the
SMALLINT data type requires only two bytes per value, arithmetic operations
are performed efficiently. SMALLINT, however, stores only a limited range of
values, compared to other built-in numeric data types. If a number is outside
the range of the minimum and maximum SMALLINT values, the database
server does not store the data value, but instead issues an error message.
TEXT
The TEXT data type stores any kind of text data. It can contain both
single-byte and multibyte characters that the locale supports. The term simple
large object refers to the TEXT and BYTE data types.
A TEXT column has a theoretical limit of 231 bytes (two gigabytes) and a
practical limit that your available disk storage determines.
No more than 195 columns of the same table can be declared as TEXT data
types. (The same restriction also applies to BYTE data types.)
You can use TEXT operands in Boolean expressions only when you are testing
for NULL values with the IS NULL or IS NOT NULL operators.
You can insert data into TEXT columns in the following ways:
v With the dbload or onload utilities
v With the LOAD statement (DB–Access)
v From TEXT host variables (ESQL)
You cannot use a quoted text string, number, or any other actual value to
insert or update TEXT columns.
When you select a TEXT column, you can choose to receive all or part of it.
To retrieve it all, use the regular syntax for selecting a column. You can also
select any part of a TEXT column by using subscripts, as this example shows:
SELECT cat_descr [1,75] FROM catalog WHERE catalog_num = 10001
This statement reads the first 75 bytes of the cat_descr column associated with
the catalog_num value 10001.
A built-in cast exists to convert TEXT objects to CLOB objects. For more
information, see the IBM Informix: Database Design and Implementation Guide.
Strings of the TEXT data type are collated in code-set order. For more
information on collating orders, see the IBM Informix: GLS User's Guide.
The size of the maximum size (m) parameter of a VARCHAR column can
range from 1 to 255 bytes. If you are placing an index on a VARCHAR
column, the maximum size is 254 bytes. You can store character strings that
are shorter, but not longer, than the m value that you specify.
Specifying the minimum reserved space (r) parameter is optional. This value
can range from 0 to 255 bytes but must be less than the maximum size (m) of
the VARCHAR column. If you do not specify any minimum value, it defaults
to 0. You should specify this parameter when you initially intend to insert
rows with short or NULL character strings in the column but later expect the
data to be updated with longer values.
For variable-length strings longer than 255 bytes, you can use the LVARCHAR
data type, whose upper limit is 32,739 bytes, instead of VARCHAR. Because
LVARCHAR is implemented as a built-in opaque data type, however, you
cannot access LVARCHAR columns in distributed queries of remote tables.
No more than 195 columns of the same table can be VARCHAR data types.
Extended Parallel Server does not support BLOB, CLOB, or LVARCHAR. For
a description of character, numeric, and miscellaneous data types, refer to the
appropriate entry in “Description of Data Types” on page 2-6. Page references
are in the alphabetical list in Table 2-1 on page 2-3.
Large objects
No more than 195 columns of the same table can be declared as BYTE or
TEXT data types. Unlike smart large objects, simple large objects do not
support random access to the data. When you transfer a simple large object
between a client application and the database server, you must transfer the
entire BYTE or TEXT value. If the data cannot fit into memory, you must store
the data value in an operating-system file and then retrieve it from that file.
Smart large objects are also useful for opaque data types with large storage
requirements. (See the description of opaque data types in “Opaque Data
Types” on page 2-49.) They have a theoretical size limit of 242 bytes and a
practical limit that your disk capacity determines.
When you define a BLOB or CLOB column, you can determine the following
large-object characteristics:
v LOG and NOLOG: whether the database server should log the smart large
object in accordance with the current database log mode
v KEEP ACCESS TIME and NO KEEP ACCESS TIME: whether the database
server should keep track of the last time the smart large object was accessed
v HIGH INTEG and MODERATE INTEG: whether the database server should
use page headers to detect data corruption
Use of these characteristics can affect performance. For information, see your
IBM Informix: Performance Guide.
To access a BLOB or CLOB column from within a client application, use one
of the following application programming interfaces (APIs):
v From within an IBM Informix ESQL/C program, use the smart-large-object
API. (For more information, see the IBM Informix: ESQL/C Programmer's
Manual.)
v From within a DataBlade module, use the Client and Server API. (For more
information, see the IBM Informix: DataBlade API Programmer's Guide.)
For information on smart large objects, see the IBM Informix: Guide to SQL
Syntax and IBM Informix: Database Design and Implementation Guide.
Time Data Types
DATE and DATETIME data values represent zero-dimensional points in time;
INTERVAL data values represent 1-dimensional spans of time, with positive
or negative values. DATE precision is always an integer count of days, but
various field qualifiers can define the DATETIME and INTERVAL precision.
You can use DATE, DATETIME, and INTERVAL data in arithmetic and
relational expressions. You can manipulate a DATETIME value with another
DATETIME value, an INTERVAL value, the current time (specified by the
keyword CURRENT), or some unit of time (using the keyword UNITS).
You can use a DATE value in most contexts where a DATETIME value is
valid, and vice versa. You also can use an INTERVAL operand in arithmetic
Table 2-7 lists the binary arithmetic operations that you can perform on DATE,
DATETIME, and INTERVAL operands, as well as the data type that is
returned by the arithmetic expression.
Table 2-7. Arithmetic Operations on DATE, DATETIME, and INTERVAL Values
Operand 1 Operator Operand 2 Result
DATE - DATETIME INTERVAL
DATETIME - DATE INTERVAL
DATE + or - INTERVAL DATETIME
DATETIME - DATETIME INTERVAL
DATETIME + or - INTERVAL DATETIME
INTERVAL + DATETIME DATETIME
INTERVAL + or - INTERVAL INTERVAL
DATETIME - CURRENT INTERVAL
CURRENT - DATETIME INTERVAL
INTERVAL + CURRENT DATETIME
CURRENT + or - INTERVAL DATETIME
DATETIME + or - UNITS DATETIME
INTERVAL + or - UNITS INTERVAL
INTERVAL * or / NUMBER INTERVAL
No other combinations are allowed. You cannot add two DATETIME values
because this operation does not produce either a specific time or a span of
time. For example, you cannot add December 25 and January 1, but you can
subtract one from the other to find the time span between them.
If the second DATETIME value has fewer fields than the first, the precision of
the second operand is increased automatically to match the first.
If the second DATETIME operand has more fields than the first (regardless of
whether the precision of the extra fields is larger or smaller than those in the
first operand), the additional time unit fields in the second value are ignored
in the calculation.
In the next expression (and its result), the year is not included for the second
operand. Therefore, the year is set automatically to the current year (from the
system clock-calendar), in this example 2005, and the resulting INTERVAL is
negative, which indicates that the second date is later than the first.
DATETIME (2005-9-30) YEAR TO DAY
- DATETIME (10-1) MONTH TO DAY
In the cases that Table 2-8 shows, DATE values are first converted to their
corresponding DATETIME equivalents, and then the expression is evaluated
by the rules of arithmetic.
The database locale defines the default DATE and DATETIME formats. For
the default locale, U.S. English, these formats are ’mm/dd/yy’ for DATE values
and ’yyyy-mm-dd hh:MM:ss’ for DATETIME values.
In a nondefault locale, literal DATE and DATETIME strings must match the
formats that the locale defines. For more information, see the IBM Informix:
GLS User's Guide.
You can customize the DATE format that the database server expects with the
DBDATE and GL_DATE environment variables. You can customize the
DATETIME format that the database server expects with the DBTIME and
GL_DATETIME environment variables. For more information, see “DBDATE”
on page 3-25 and “DBTIME” on page 3-39. For more information on all these
environment variables, see the IBM Informix: GLS User's Guide.
You can also subtract one DATE value from another DATE value, but the
result is a positive or negative INTEGER count of days, rather than an
INTERVAL value. If an INTERVAL value is required, you can either use the
UNITS DAY operator to convert the INTEGER value into an INTERVAL DAY
TO DAY value, or else use EXTEND to convert one of the DATE values into a
DATETIME value before subtracting.
For example, the following expression uses the DATE( ) function to convert
character string constants to DATE values, calculates their difference, and then
uses the UNITS DAY keywords to convert the INTEGER result into an
INTERVAL value:
If you need YEAR TO MONTH precision, you can use the EXTEND function
on the first DATE operand, as the following example shows:
EXTEND (DATE (’5/2/1994’), YEAR TO MONTH) - DATE (’4/6/1955’)
The use of numeric qualifiers alerts the database server that the MINUTE and
FRACTION in the first value and the SECOND in the second value exceed the
default number of digits.
When you add or subtract INTERVAL values, the second value cannot have a
field with greater precision than the first. The second INTERVAL, however,
can have a field of smaller precision than the first. For example, the second
INTERVAL can be HOUR TO SECOND when the first is DAY TO HOUR. The
additional fields (in this case MINUTE and SECOND) in the second
INTERVAL value are ignored in the calculation.
For more information about extended data types, see the IBM Informix:
Database Design and Implementation Guide and IBM Informix: User-Defined
Routines and Data Types Developer's Guide.
Complex Data Types
A complex data type can store one or more values of other built-in and
extended data types. Figure 2-5 shows the complex types that Dynamic Server
supports.
Complex data types can be nested. For example, you can construct a ROW
type whose fields include one or more sets, multisets, ROW types, and lists.
Likewise, a collection type can have elements whose data type is a ROW type
or a collection type.
Complex types that include opaque types inherit the following support
functions.
Sections that follow summarize the complex data types. For more information,
see the IBM Informix: Database Design and Implementation Guide.
Important: An element cannot have a NULL value. You must specify the NOT
NULL constraint for collection elements. No other constraints are
valid for collections.
When you specify element values for a collection, list the element values after
the constructor and between braces ( { } ). For example, suppose you have a
collection column with the following MULTISET data type:
CREATE TABLE table1
(
mset_col MULTISET(INTEGER NOT NULL)
)
The next INSERT statement adds one group of element values to this column.
(The word MULTISET in these two examples is the MULTISET constructor.)
INSERT INTO table1 VALUES (MULTISET{5, 9, 7, 5})
You can also use nested dot notation to access collection data. For more about
accessing elements of a collection, see the IBM Informix: Guide to SQL Tutorial.
Important: Collection data types are not valid as arguments to functions that
are used for functional indexes.
The structure of an unnamed ROW data type is the number (and the order of
data types) of its fields.
No more than 195 columns of the same table can be declared as ROW data
types. For more information about ROW data types, see “ROW, Named (IDS)”
on page 2-27 and “ROW, Unnamed (IDS)” on page 2-28.
You can cast between named and unnamed ROW data types; this is described
in the IBM Informix: Database Design and Implementation Guide.
Distinct Data Types
A distinct data type has the same internal structure as some other source data
type in the database. The source type can be a built-in or extended data type.
What distinguishes a distinct type from its source type are support functions
that are defined on the distinct type.
No more than 195 columns in the same table can be DISTINCT types that are
based on BYTE, TEXT, ROW, LVARCHAR, NVARCHAR, or VARCHAR source
types, and no more than 97 can have collection source types. For more
information, see the section “Distinct (IDS)” on page 2-17. See also
IBM Informix: User-Defined Routines and Data Types Developer's Guide.
Opaque Data Types
An opaque data type is a user-defined data type that is fully encapsulated.
That is, its internal structure is unknown to the database server. User-defined
types (UDTs) that are not DISTINCT types whose source types are built-in
types are opaque.
The built-in data types BLOB, BOOLEAN, CLOB, and LVARCHAR are
implemented as opaque data types. You cannot access these built-in opaque
data types in cross-server distributed operations, but you can access them in
other databases of the same Dynamic Server instance.
For more information, see the section “Opaque (IDS)” on page 2-26. See also
IBM Informix: User-Defined Routines and Data Types Developer's Guide.
If you change data types, the new data type must be able to store all of the
old value.
A cast is either built-in or user defined. Guidelines exist for casting distinct
and extended data types. For more information about casting opaque data
types, see IBM Informix: User-Defined Routines and Data Types Developer's Guide.
For information about casting other extended data types, see the
IBM Informix: Database Design and Implementation Guide.
Using Built-in Casts
User informix owns built-in casts. They govern conversions from one built-in
data type to another. Built-in casts allow the database server to attempt the
following data-type conversions:
v A character type to any other character type
v A character type to or from another built-in type
v A numeric type to any other numeric type
When you convert a column from one built-in data type to another, the
database server applies the appropriate built-in casts to each value already in
the column. If the new data type cannot store any of the resulting values, the
ALTER TABLE statement fails.
For example, if you try to convert a column from the INTEGER data type to
the SMALLINT data type and the following values exist in the INTEGER
column, the database server does not change the data type, because
SMALLINT columns cannot accommodate numbers greater than 32,767:
100 400 700 50000 700
The same situation might occur if you attempt to transfer data from FLOAT
or SMALLFLOAT columns to INTEGER, SMALLINT, or DECIMAL columns.
Errors of overflow, underflow, or truncation can occur during data type
conversion.
Sections that follow describe database server behavior during certain types of
casts and conversions.
You can also convert a numeric column to a character column. If the character
column is not large enough to receive the number, however, the database
server generates an error. If the database server generates an error, it cannot
complete the ALTER TABLE statement or cast, and leaves the column values
as characters. You receive an error message and the statement is rolled back
automatically (regardless of whether you are in a transaction).
For information on how to register and use implicit and explicit casts, see the
CREATE CAST statement in the IBM Informix: Guide to SQL Syntax and the
IBM Informix: Database Design and Implementation Guide.
Implicit Casts
Implicit casts allow you to convert a user-defined data type to a built-in type
or vice versa. The database server automatically invokes a single implicit cast
when needed to evaluate and compare expressions or pass arguments.
Operations that require more than one implicit cast fail.
Users can explicitly invoke an implicit cast using the CAST AS keywords or
the double colon ( :: ) cast operator.
Explicit Casts
Explicit casts, unlike implicit casts or built-in casts, are never invoked
automatically by the database server. Users must invoke them explicitly with
the CAST AS keywords or with the double colon ( :: ) cast operator.
For information about casting and the IMPEX, IMPEXBIN, LVARCHAR, and
SENDRECV types, see IBM Informix: User-Defined Routines and Data Types
Developer's Guide.
Casts for Distinct Types
You define a distinct type based on a built-in type or an existing opaque type
or ROW type. Although data of the distinct type has the same length and
alignment and is passed in the same way as data of the source type, the two
cannot be compared directly. To compare a distinct type and its source type,
you must explicitly cast one type to the other.
You can create an implicit cast between a distinct type and its source type. To
create an implicit cast, however, you must first drop the default explicit cast
between the distinct type and its source type.
You also can use all casts that have been registered for the source type
without modification on the distinct type. You can also create and register
new casts and support functions that apply only to the distinct type.
For examples that show how to create a cast function for a distinct type and
register the function as cast, see the IBM Informix: Database Design and
Implementation Guide.
Important: For releases of Dynamic Server earlier than Version 9.21, distinct
data types inherited the built-in casts that are provided for the
source type. The built-in casts of the source type are not inherited
by distinct data types in this release.
Named Unnamed
Opaque Distinct ROW ROW Collection Built-in
Target Type Type Type Type Type Type Type
Opaque Explicit or Explicit Explicit Not Valid Not Valid Explicit or
Type implicit implicit3
Distinct Explicit3 Explicit Explicit Not Valid Not Valid Explicit or
Type implicit
Named Explicit3 Explicit Explicit3 Explicit1 Not Valid Not Valid
ROW Type
Unnamed Not Valid Not Valid Explicit1 Implicit1 Not Valid Not Valid
ROW Type
Collection Not Valid Not Valid Not Valid Not Valid Explicit2 Not Valid
Type
Built-in Explicit or Explicit Not Valid Not Valid Not Valid System
Type implicit3 or defined
implicit (implicit)
1
Applies when two ROW types are structurally equivalent or casts exist to handle
data conversions where corresponding field types are not the same.2 Applies when a
cast exists to convert between the element types of the respective collection types.3
Applies when a user-defined cast exists to convert between the two data types.
The table shows only whether or not a cast between a source type and a
target type are possible. In some cases, you must first create a user-defined
cast before you can perform a conversion between two data types. In other
cases, the database server provides either an implicit cast or a built-in cast
that you must explicitly invoke.
Operator Precedence
An operator is a symbol or keyword that can appear in an SQL expression.
Most SQL operators are restricted in the data types of their operands and
returned values. Some operators only support operands of built-in data types;
others can support built-in and extended data types as operands.
The following table shows the precedence of the operators that Informix
database servers support, in descending (highest to lowest) order of
precedence. Operators with the same precedence are listed in the same row.
See the IBM Informix: Guide to SQL Syntax for the syntax and semantics of
these SQL operators.
In This Chapter
Various environment variables affect the functionality of your IBM Informix
products. You can set environment variables that identify your terminal,
specify the location of your software, and define other parameters.
Some environment variables are required; others are optional. You must either
set or accept the default setting for required environment variables.
This chapter describes how to use the environment variables that apply to one
or more IBM Informix products and shows how to set them.
The GLS environment variables that support nondefault locales are described
in the IBM Informix: GLS User's Guide. The GLS variables are included in the
list of environment variables in Table 3-1 on page 3-14 and in the topic index
in Table 3-4 on page 3-81, but are not discussed in this manual.
The database server uses the environment variables that were in effect at the
time when the database server was initialized.
Important: Do not set any environment variable in the home directory of user
informix (nor in the file .informix in that directory) while
initializing the database and creating the sysmaster database.
For native Windows IBM Informix applications, such as the database server,
environment variables can be set only in the Windows registry. Environment
variables set in the registry cannot be modified elsewhere.
Shell Command
C setenv ABCD value
Bourne ABCD=value
export ABCD
Korn ABCD=value
export ABCD
The following diagram shows how the syntax for setting an environment
variable is represented throughout this chapter. These diagrams indicate the
setting for the C shell; for the Bourne or Korn shells, use the syntax illustrated
in the preceding table.
setenv ABCD value
Shell Command
C unsetenv ABCD
Bourne or Korn unset ABCD
Rather than entering an explicit pathname, you can use the value of the
INFORMIXDIR environment variable (represented as $INFORMIXDIR), as
the following example shows:
setenv INFORMIXDIR /usr/informix
setenv PATH $INFORMIXDIR/bin:$PATH
You might prefer to use this version to ensure that your PATH entry does not
conflict with the search path that was set in INFORMIXDIR, and so that you
do not have to reset PATH whenever you change INFORMIXDIR. If you set
the PATH environment variable on the C shell command line, you might need
to include braces ( { } ) with the existing INFORMIXDIR and PATH, as the
following command shows:
setenv PATH ${INFORMIXDIR}/bin:${PATH}
For more information about how to set and modify environment variables,
refer to the manuals for your operating system.
Viewing Your Environment-Variable Settings
After you install one or more IBM Informix products, enter the following
command at the system prompt to view your current environment settings.
Important: If you set one or more environment variables before you start the
database server, and you do not explicitly set the same
environment variables for your client products, the clients will
adopt the original settings.
To view your current settings after one or more IBM Informix products are
installed, enter the following command at the command prompt.
set
Rather than entering an explicit pathname, you can use the value of the
INFORMIXDIR environment variable (represented as %INFORMIXDIR%),
as the following example shows:
set INFORMIXDIR=d:\informix
set PATH=%INFORMIXDIR%\bin;%PATH%
You might prefer to use this version to ensure that your PATH entry does not
contradict the search path that was set in INFORMIXDIR and to avoid the
need to reset PATH whenever you change INFORMIXDIR.
For example, if you open one command window and set the variable,
INFORMIXDIR, and then open another command window and type set to
check your environment, you will find that INFORMIXDIR is not set in the
new command-prompt session.
The database server installation program creates a batch file that you can use
to configure command-prompt utilities, ensuring that your command-prompt
environment is initialized correctly each time that you run a
command-prompt session. The batch file, dbservername.cmd, is located in
%INFORMIXDIR%, and is a plain text file that you can modify with any text
editor. If you have more than one database server installed in
%INFORMIXDIR%, there will be more than one batch file with the .cmd
extension, each bearing the name of the database server with which it is
associated.
The notation ERG in the Page column indicates an environment variable that
must be set with the CDR_ENV configuration parameter and that is described
in the appendix on configuration parameters and environment variables of the
IBM Informix: Dynamic Server Enterprise Replication Guide.
The notation GLS in the Page column indicates a GLS environment variable
that is valid in nondefault locales and that is described in the GLS
environment variables chapter of IBM Informix: GLS User's Guide.
Table 3-1. Alphabetical List Of Environment Variables
Environment Variable XPS IDS Restrictions Page
AC_CONFIG X X ON-Bar 3-18
AFDEBUG JVM 3-18
ANSIOWNER X None 3-18
BIG_FET_BUF_SIZE X SQL APIs and 3-19
DB-Access only
CC8BITLEVEL ESQL/C only GLS
CDRSITES_731 X ER only ERG
CDRSITES_92X X ER only ERG
CDR_LOGDELTA X ER only ERG
CDR_PERFLOG X ER only ERG
CDR_ROUTER X ER only ERG
CDR_RMSCALEFACT X ER only ERG
CLIENT_LOCALE X X None GLS
CPFIRST X X ESQL/C only 3-20
DBACCNOIGN X X DB-Access only 3-20
DBANSIWARN X X None 3-21
DBBLOBBUF X X UNLOAD only 3-22
DBCENTURY SQL APIs only 3-22
Tip: You might encounter references to environment variables that are not
listed in Table 3-1 on page 3-14. Most likely, these environment variables
Environment Variables
Sections that follow discuss (in alphabetical order) environment variables that
IBM Informix database server products and their utilities use.
For information on archecker, see your IBM Informix: Backup and Restore
Guide.
AFDEBUG
You can create files to hold verbose messages from the Java virtual machine
(JVM) about releasing memory that had been allocated to objects by setting
the AFDEBUG environment variable.
setenv AFDEBUG
No value is required. You can also set the configuration parameter AFCRASH
to 0x00000010 to achieve the same result.
ANSIOWNER (IDS)
In an ANSI-compliant database, you can prevent the default behavior of
upshifting lowercase letters in owner names that are not delimited by
quotation marks by setting the ANSIOWNER environment variable to 1.
Because they do not match the lettercase of your userid, any SQL statements
that specified the formats that are stored as OWEN.oblong would fail with
errors.
BIG_FET_BUF_SIZE (XPS)
The BIG_FET_BUF_SIZE environment variable functions the same as the
FET_BUF_SIZE environment variable, but supports a larger cursor buffer.
setenv BIG_FET_BUF_SIZE size
size is a positive integer that is larger than the default buffer size.
The size can be no greater than 4 gigabytes and specifies the size (in bytes) of
the fetch buffer that holds data retrieved by a query. For example, to set a
buffer size to 5,000 bytes on a UNIX system that uses the C shell, set the
BIG_FET_BUF_SIZE environment variable with the following command:
setenv BIG_FET_BUF_SIZE 5000
When you compile an ESQL/C program with CPFIRST not set, the ESQL/C
preprocessor runs first, by default, on the program source file and then passes
the resulting file to the C language preprocessor and compiler. You can,
however, compile an ESQL/C program source file in the following order:
1. Run the C preprocessor
2. Run the ESQL/C preprocessor
3. Run the C compiler and linker
To use a nondefault compilation order for a specific program, you can either
give the program source file a .ecp extension, run the -cp option with the esql
command on a program source file with a .ec extension, or set CPFIRST.
Set CPFIRST to TRUE (uppercase only) to run the C preprocessor before the
ESQL/C preprocessor on all ESQL/C source files in your environment,
irrespective of whether the -cp option is passed to the esql command or the
source files have the .ec or the .ecp extension.
DBACCNOIGN
The DBACCNOIGN environment variable affects the behavior of the
DB–Access utility if an error occurs under one of the following circumstances:
v You run DB–Access in nonmenu mode.
v In Dynamic Server only, you execute the LOAD command with DB–Access
in menu mode.
UPDATE customer
SET balance =
(SELECT (balance-60)
FROM customer WHERE custid = ’cust1’)
WHERE custid = ’cust1
COMMIT WORK
Here, one statement has a misspelled table name: the receipt table does not
exist. If DBACCNOIGN is not set in your environment, DB–Access inserts
two records into the receipts table and updates the customer table. Now, the
decrease in the customer balance exceeds the sum of the inserted receipts.
Assume you execute the LOAD statement from the DB–Access SQL menu.
Forty-nine rows of data load correctly, but the 50th row contains an invalid
value that causes an error. If you set DBACCNOIGN to 1, the database server
does not insert the forty-nine previous rows into the database. If
DBACCNOIGN is not set, the database server inserts the first forty-nine
rows.
DBANSIWARN
Setting the DBANSIWARN environment variable indicates that you want to
check for Informix extensions to ANSI-standard SQL syntax. Unlike most
environment variables, you do not need to set DBANSIWARN to a value.
You can set it to any value or to no value.
For details on SQLCA, see the IBM Informix: ESQL/C Programmer's Manual.
DBBLOBBUF
The DBBLOBBUF environment variable controls whether TEXT or BYTE
values are stored temporarily in memory or in a file while being processed by
the UNLOAD statement. DBBLOBBUF affects only the UNLOAD statement.
setenv DBBLOBBUF size
If the TEXT or BYTE data size is smaller than the default of 10 kilobytes (or
the setting of DBBLOBBUF), the TEXT or BYTE value is temporarily stored in
memory. If the data size is larger than the default or the DBBLOBBUF setting,
the data value is written to a temporary file. For instance, to set a buffer size
of 15 kilobytes, set DBBLOBBUF as in the following example:
setenv DBBLOBBUF 15
Here any TEXT or BYTE value smaller than 15 kilobytes is stored temporarily
in memory. Values larger than 15 kilobytes are stored temporarily in a file.
DBCENTURY
To avoid problems in expanding abbreviated years, applications should
require entry of 4-digit years, and should always display years as four digits.
The DBCENTURY environment variable specifies how to expand literal DATE
and DATETIME values that are entered with abbreviated year values.
When DBCENTURY is not set (or is set to R), the first two digits of the
current year are used to expand 2-digit year values. For example, if today’s
date is 09/30/2003, then the abbreviated date 12/31/99 expands to
12/31/2099, and the abbreviated date 12/31/00 expands to 12/31/2000.
Setting Algorithm
R = Current Use the first two digits of the current year to expand the year value.
P = Past Expanded dates are created by prefixing the abbreviated year value
with 19 and 20. Both dates are compared to the current date, and the
most recent date that is earlier than the current date is used.
F = Future Expanded dates are created by prefixing the abbreviated year value
with 20 and 21. Both dates are compared to the current date, and the
earliest date that is later than the current date is used.
C = Closest Expanded dates are created by prefixing the abbreviated year value
with 19, 20, and 21. These three dates are compared to the current
date, and the date that is closest to the current date is used.
Settings are case sensitive, and no error is issued for invalid settings. If you
enter f (for example), then the default (R) setting takes effect. The P and F
settings cannot return the current date, which is not in the past or future.
Years entered as a single digit are prefixed with 0 and then expanded.
Three-digit years are not expanded. Pad years earlier than 100 with leading
zeros.
DBCENTURY = P:
Example data type: DATE
Current date: 4/6/2003
User enters: 1/1/1
Prefix with "19" expansion : 1/1/1901
Prefix with "20" expansion: 1/1/2001
Analysis: Both are prior to current date, but 1/1/2001 is closer to
current date.
DBCENTURY = F:
Example data type: DATETIME year to month
Current date: 5/7/2005
User enters: 1-1
Prefix with "20" expansion: 2001-1
Prefix with "21" expansion: 2101-1
Analysis: Only date 2101-1 is after the current date, so it is chosen.
DBCENTURY = C:
Example data type: DATE
Current date: 4/6/2000
User enters: 1/1/1
Prefix with "19" expansion : 1/1/1901
Prefix with "20" expansion: 1/1/2001
Prefix with "21" expansion: 1/1/2101
Analysis: Here 1/1/2001 is closest to the current date, so it is chosen.
Setting DBCENTURY does not affect IBM Informix products when the locale
specifies a non-Gregorian calendar, such as Hebrew or Islamic calendars. The
leading digits of the current year are used for alternate calendar systems
when the year is abbreviated.
After the objects are redefined, date literals within expressions of the objects
will be interpreted according to the environment at the time when the object
was created or was last modified. Otherwise, their behavior will depend on
the runtime environment and might become inconsistent if this changes.
The value of DBCENTURY and the current date are not the only factors that
determine how the database server interprets date and DATETIME values.
The DBDATE, DBTIME, GL_DATE, and GL_DATETIME environment
variables can also influence how dates are interpreted. For information about
GL_DATE and GL_DATETIME, see the IBM Informix: GLS User's Guide.
Some East Asian locales support additional syntax for era-based dates. For
details of era-based formats, see IBM Informix: GLS User's Guide.
For the U.S. English locale, the default for DBDATE is MDY4/, where M
represents the month, D represents the day, Y4 represents a four-digit year, and
slash ( / ) is the time-units separator (for example, 01/08/2002). Other valid
characters for the separator are a hyphen ( - ), a period ( . ), or a zero (0). To
indicate no separator, use the zero. The slash ( / ) is used by default if you
attempt to specify a character other than a hyphen, period, or zero as a
separator, or if you do not include any separator in the DBDATE
specification.
If DBDATE is not set on the client, any DBDATE setting on the database
server overrides the MDY4/ default on the client. If DBDATE is set on the
client, that value (rather than the setting on the database server) is used by
the client.
The following table shows some examples of valid DBDATE settings and
their corresponding displays for the date 8 January, 2005:
Formats Y4MD* (because asterisk is not a valid separator) and MDY4 (with no
separator defined) both display the default symbol (slash) as the separator.
Also, certain routines that IBM Informix ESQL/C calls can use the DBTIME
variable, rather than DBDATE, to set DATETIME formats to international
specifications. For more information, see the discussion of the DBTIME
environment variable in “DBTIME” on page 3-39 and in the IBM Informix:
ESQL/C Programmer's Manual.
The setting of the DBDATE variable takes precedence over that of the
GL_DATE environment variable, as well as over any default DATE format
that CLIENT_LOCALE specifies. For information about GL_DATE and
CLIENT_LOCALE, see the IBM Informix: GLS User's Guide.
For example, if you specify a literal DATE value in an INSERT statement, the
database server expects this literal value to be compatible with the format that
DBDATE specifies. Similarly, the database server interprets the date that you
specify as the argument to the DATE( ) function to be in DBDATE format.
See “Abbreviated Years and Expressions in Database Objects” on page 3-24 for
a discussion of legacy objects from earlier versions of Informix database
servers that are always evaluated according to the runtime environment. That
section describes how to redefine objects so that dates are interpreted
according to environment variable settings that were in effect when the object
was defined (or when the object was last modified).
The delimiter can be any single character, except those in the following list:
v Hexadecimal digits (0 through 9, a through f, A through F)
v Newline or CTRL-J
v The backslash ( \ ) symbol
The vertical bar ( | = ASCII 124) is the default. To change the field delimiter
to a plus ( + ) symbol, for example, you can set DBDELIMITER as follows:
setenv DBDELIMITER ’+’
DBEDIT
The DBEDIT environment variable specifies the text editor to use with SQL
statements and command files in DB–Access. If DBEDIT is set, the specified
text editor is invoked automatically. If DBEDIT is not set, you are prompted
to specify a text editor as the default for the rest of the session.
For most UNIX systems, the default text editor is vi. If you use another text
editor, be sure that it creates flat ASCII files. Some word processors in
document mode introduce printer control characters that can interfere with the
operation of your IBM Informix product.
To specify the EMACS text editor, set DBEDIT with the following command:
setenv DBEDIT emacs
DBFLTMASK
The DB–Access utility displays the floating-point values of data types FLOAT,
SMALLFLOAT, and DECIMAL(p) within a 14-character buffer. By default,
DB–Access displays as many digits to the right of the decimal point as will fit
into this character buffer. Therefore, the actual number of decimal digits that
DB–Access displays depends on the size of the floating-point value.
To reduce the number of digits displayed to the right of the decimal point in
floating-point values, set DBFLTMASK to the desired number of digits.
setenv DBFLTMASK scale
If the floating-point value contains more digits to the right of the decimal than
DBFLTMASK specifies, DB–Access rounds the value to the specified number
of digits. If the floating-point value contains fewer digits to the right of the
decimal, DB–Access pads the value with zeros. If you set DBFLTMASK to a
value greater than can fit into the 14-character buffer, however, DB–Access
rounds the value to the number of digits that can fit.
DBLANG
The DBLANG environment variable specifies the subdirectory of
$INFORMIXDIR or the full pathname of the directory that contains the
compiled message files that an IBM Informix product uses.
setenv DBLANG relative_path
full_path
IBM Informix products that use the default U.S. English locale search for
message files in the following order:
1. In $DBLANG, if DBLANG is set to a full pathname
2. In $INFORMIXDIR/msg/$DBLANG, if DBLANG is set to a relative
pathname
3. In $INFORMIXDIR/$DBLANG, if DBLANG is set to a relative pathname
4. In $INFORMIXDIR/msg/en_us/0333
5. In $INFORMIXDIR/msg/en_us.8859-1
6. In $INFORMIXDIR/msg
7. In $INFORMIXDIR/msg/english
For more information on search paths for messages, see the description of
DBLANG in the IBM Informix: GLS User's Guide.
DBMONEY
The DBMONEY environment variable specifies the display format of values
in columns of smallfloat, FLOAT, DECIMAL, or MONEY data types, and of
complex data types derived from any of these data types.
The back symbol can be up to seven characters and can contain any character
that the locale supports, except a digit, a comma ( , ), or a period ( . ) symbol.
The front symbol can be up to seven characters and can contain any character
that the locale supports except a digit, a comma ( , ), or a period ( . ) symbol.
If you specify any character that is not a letter of the alphabet for front or back,
you must enclose the front or back setting between single quotation ( ’ ) marks.
When you display MONEY values, IBM Informix products use the
DBMONEY setting to format the output. DBMONEY has no effect, however,
on the internal format of data values that are stored in columns of the
database.
If you do not set DBMONEY, then MONEY values for the default locale, U.S.
English, are formatted with a dollar sign ( $ ) that precedes the MONEY
value, a period ( . ) that separates the integral from the fractional part of the
MONEY value, and no back symbol. For example, 100.50 is formatted as
$100.50.
Here DM is the front currency symbol that precedes the MONEY value, and a
comma separates the integral from the fractional part of the MONEY value.
As a result, the value 100.50 is displayed as DM100,50.
Global Language Support (GLS) does not require the DBNLS environment
variable. But Dynamic Server databases continue to support the legacy
behavior of DBNLS, which supports applications that manipulate tables with
NCHAR or NVARCHAR columns.
setenv DBNLS
‘1’
‘2’
For UNIX systems that use the C shell, the following command line enables
client applications such as DB-Access, IBM Informix SQL, IBM Informix 4GL,
IBM Informix Dynamic 4GL, and embedded-SQL applications such as
ESQL/C or ESQL/COBOL to convert automatically between CHAR and
VARCHAR variables of the client application and NCHAR and NVARCHAR
columns of the database:
setenv DBNLS 1
This setting also supports the automatic conversion of values retrieved from
NCHAR columns into CHAR variables, and the conversion of NVARCHAR
column values into VARCHAR variables.
To support these features, DBNLS must also be set to 1 on the client system.
This setting also enables the client system to display dates, numbers, and
currency values in formats specified on the client locale.
unsetenv DBNLS
On UNIX systems that use the C shell, either of these commands disables
automatic conversion to and from NCHAR and NVARCHAR data values (by
setting no value for DBNLS).
then automatic data type conversion between NCHAR and CHAR and
between NVARCHAR and VARCHAR is supported (if the client system has
DBNLS set to 1 or 2), but the database server can have a different locale from
the client system.
DBONPLOAD (IDS)
The DBONPLOAD environment variable specifies the name of the database
that the onpload utility of the High-Performance Loader (HPL) uses. If
DBONPLOAD is set, onpload uses the specified name as the name of the
database; otherwise, the default name of the database is onpload.
setenv DBONPLOAD dbname
dbname specifies the name of the database that the onpload utility
uses.
For example, to specify the name load_db as the name of the database, enter
the following command:
setenv DBONPLOAD load_db
For more information, see the IBM Informix: High-Performance Loader User's
Guide.
DBPATH
The DBPATH environment variable identifies database servers that contain
databases. DBPATH can also specify a list of directories (in addition to the
current directory) in which DB–Access looks for command scripts (.sql files).
DBPATH can contain up to 16 entries. Each entry must be less than 128
characters. In addition, the maximum length of DBPATH depends on the
hardware platform on which you set DBPATH.
If the database is not located during the initial search, and if DBPATH is set,
the database servers and directories in DBPATH are searched for in the
specified database. These entries are searched in the same order in which they
are listed in the DBPATH setting.
Specifying a Servername
You can set DBPATH to contain only database server names. This feature
allows you to locate only databases; you cannot use it to locate command
files.
If you use DB–Access in this example, the names of all the databases on the
quality and marketing database servers are displayed with the Select option
of the DATABASE menu.
DBPRINT
The DBPRINT environment variable specifies the default printing program.
setenv DBPRINT program
If you do not set DBPRINT, the default program is found in one of two places:
v For most BSD UNIX systems, the default program is lpr.
v For UNIX System V, the default program is usually lp.
If you do not specify the full pathname, the database server searches your
PATH for the specified command. It is highly recommended that you use the
full pathname syntax on interactive UNIX platforms to avoid problems with
similarly named programs in other directories and possible confusion with the
restricted shell (/usr/bin/rsh).
Separate the dbspace entries with either colons or commas. The number of
dbspaces is limited by the maximum size of the environment variable, as
defined by your operating system. Your database server does not create a
dbspace specified by the environment variable if the dbspace does not exist.
The two classes of temporary tables are explicit temporary tables that the user
creates and implicit temporary tables that the database server creates. Use
DBSPACETEMP to specify the dbspaces for both types of temporary tables.
If you create an explicit temporary table with the CREATE TEMP TABLE
statement and do not specify a dbspace for the table either in the IN dbspace
clause or in the FRAGMENT BY clause, the database server uses the settings
in DBSPACETEMP to determine where to create the table.
If you create an explicit temporary table with the SELECT INTO TEMP
statement, the database server uses the settings in DBSPACETEMP to
determine where to create the table.
If DBSPACETEMP is set, and the dbspaces that it lists include both logging
and non-logging dbspaces, the database server stores temporary tables that
implicitly or explicitly support transaction logging in a logged dbspace, and
non-logging temporary tables in a non-logging dbspace.
The database server creates implicit temporary tables for its own use while
executing join operations, SELECT statements with the GROUP BY clause,
SELECT statements with the ORDER BY clause, and index builds.
When it creates explicit or implicit temporary tables, the database server uses
disk space for writing the temporary data. If there are conflicts among settings
or statement specifications for the location of a temporary table, these conflicts
are resolved in this descending (highest to lowest) order of precedence:
1. What the IN or FRAGMENT BY clause of a DDL or DML statement
specifies
2. For Extended Parallel Server, what a SET TEMP TABLE_SPACE statement
specifies
3. On UNIX platforms, the operating-system directory or directories that the
environment variable PSORT_DBTEMP specifies, if this is set
4. The dbspace or dbspaces that the environment variable DBSPACETEMP
specifies, if this is set
5. The dbspace or dbspaces that the ONCONFIG parameter DBSPACETEMP
specifies.
pathname is the full pathname of the directory for temporary files and
tables.
If DBTEMP is not set, the database server creates temporary files in the /tmp
directory and temporary tables in the DBSPACETEMP directory. See
“DBSPACETEMP” on page 3-36 for the default if DBSPACETEMP is not set.
Similarly, if you do not set DBTEMP on the client system, temporary files
(such as those created for scroll cursors) are created in the /tmp directory.
These terms and symbols are described in the pages that follow.
This quoted string can include literal characters as well as placeholders for the
values of individual time units and other elements of a DATETIME value.
DBTIME takes effect only when you call certain IBM Informix ESQL/C
DATETIME routines. (For details, see the IBM Informix: ESQL/C Programmer's
Manual.) If DBTIME is not set, the behavior of these routines is undefined,
and ″YYYY-MM-DD hh:mm:ss.fffff″ is the default display and input format for
DATETIME YEAR TO FRACTION(5) literal values in the default locale.
The following characters within a DBTIME format string are placeholders for
time units (or for other features) within a DATETIME value.
%b is replaced by the abbreviated month name.
%B is replaced by the full month name.
%d is replaced by the day of the month as a decimal number
[01,31].
For example, consider this display format for DATETIME YEAR TO SECOND:
Mar 21, 2001 at 16 h 30 m 28 s
If the user enters a two-digit year value, this value is expanded to 4 digits
according to the DBCENTURY environment variable setting. If DBCENTURY
is not set, then the string 19 is used by default for the first two digits.
Set DBTIME as the following command line (for the C shell) shows:
setenv DBTIME ’%b %d, %Y at %H h %M m %S s’
The default DBTIME produces the following ANSI SQL string format:
2001-03-21 16:30:28
You can set the default DBTIME as the following example shows:
setenv DBTIME ’%Y-%m-%d %H:%M:%S’
The F placeholder does not support this field-width and precision syntax.
In East Asian locales that support era-based dates, DBTIME can also specify
Japanese or Taiwanese eras. See IBM Informix: GLS User's Guide for details of
additional placeholder symbols for setting DBTIME to display era-based
DATETIME values, and for descriptions of the GL_DATETIME and
GL_DATE environment variables.
DBUPSPACE
The DBUPSPACE environment variable lets you specify and constrain the
amount of system disk space that the UPDATE STATISTICS statement can use
when trying to simultaneously construct multiple column distributions.
setenv DBUPSPACE max : default
For example, to set DBUPSPACE to 2,500 kilobytes of disk space and 1,000
kilobytes of memory, enter this command:
setenv DBUPSPACE 2500:1
If you do not set DBUPSPACE, the default is a megabyte (1,024 kilobytes) for
max, and the maximum amount of memory that is available without using
PDQ for default. If you attempt to set DBUPSPACE to any value less than
1,024 kilobytes, it is automatically set to 1,024 kilobytes, but no error message
is returned. If this value is not large enough to allow more than one
distribution to be constructed at a time, at least one distribution is done, even
if the amount of disk space required to do this is more than what
DBUPSPACE specifies.
DEFAULT_ATTACH
The DEFAULT_ATTACH environment variable supports the legacy behavior
of Version 7.x of Dynamic Server, which required that only nonfragmented
B-tree indexes on nonfragmented tables can be attached.
setenv DEFAULT_ATTACH 1
Database identifiers (also called SQL identifiers) are names for database objects,
such as tables and columns. Storage identifiers are names for storage objects,
such as dbspaces, blobspaces, and sbspaces (smart blob spaces). You cannot
use DELIMIDENT to declare storage identifiers that contain characters
outside the default SQL character set.
On UNIX systems that use the C shell and on which DELIMIDENT has been
set, you can disable this feature (which causes anything between double
quotes to be interpreted as an SQL identifier) by the command:
unsetenv DELIMIDENT
ENVIGNORE (UNIX)
The ENVIGNORE environment variable can deactivate specified environment
variable settings in the common (shared) and private environment-
configuration files, informix.rc and .informix respectively.
:
size is a positive integer that is larger than the default buffer size,
but no greater than 32,767, specifying the size (in bytes) of the
fetch buffer that holds data retrieved by a query.
For example, to set a buffer size to 5,000 bytes on a UNIX system that uses
the C shell, set FET_BUF_SIZE by entering the following command:
setenv FET_BUF_SIZE 5000
When FET_BUF_SIZE is set to a valid value, the new value overrides the
default value (or any previously set value of FET_BUF_SIZE). The default
setting for the fetch buffer is dependent on row size.
A valid FET_BUF_SIZE setting is in effect for the local database server as well
as for any remote database server from which you retrieve rows through a
distributed query in which the local server is the coordinator and the remote
database is subordinate. The greater the size of the buffer, the more rows can
be returned, and the less frequently the client application must wait while the
database server returns rows. A large buffer can improve performance by
reducing the overhead of filling the client-side buffer.
You should avoid using globally detached indexes because they are inherently
less efficient than locally detached indexes.
Alternatively, you can turn this variable on or off with the onutil SET
command, as in the following example:
% onutil
1> SET GLOBAL_DETACH_INFORM 1;
Dynamic Configuration completed successfully
To specify an offset from GMT for the built-in CURRENT and TODAY
functions, set IBM_XPS_PARAMS on the client system to the desired value
before you start the client application, using the following syntax.
+
setenv IBM_XPS_PARAMS ’CLIENT_TZ = hours : minutes ’
-
A minus ( - ) sign before the hours specifies a time zone east of GMT, and a
positive ( * ) sign, which is the default, specifies a time zone west of GMT.
This example specifies that CURRENT and TODAY return GMT values:
% setenv IBM_XPS_PARAMS ’CLIENT_TZ = 00:00’
The next example specifies the Atlantic time zone of eastern Canada:
% setenv IBM_XPS_PARAMS ’CLIENT_TZ = +4:00’
The onstat -g ses command can display the current offset from GMT.
To enable this alarm, set IFMX_CART_ALRM to any value before starting the
database server.
setenv IFMX_CART_ALRM n
Alternatively, you can turn this variable on or off with the onutil SET
command:
% onutil
1> SET IFMX_CART_ALRM 1;
Dynamic Configuration completed successfully
The default value is 10. The maximum is 100. If a value greater or lower is
specified, the default value is used. For more information on using the
DB-Access history command, see the IBM Informix: DB–Access User's Guide.
IFMX_OPT_FACT_TABS (XPS)
The IFMX_OPT_FACT_TABS environment variable specifies a list of fact
tables that should be used in push-down hash joins whenever possible.
,
If you do not specify a database name or owner, the fact table can be in any
database or belong to any owner.
The environment variable lists fact tables for which you want to encourage
the optimizer to choose push-down hash-join plans. If you do not specify the
database name or owner, the table can be in any database or belong to any
owner.
If the database name or owner is not specified, the table can be in any
database or can belong to any owner.
When this environment variable is set, if a query joins one of the dimension
tables in this list with any fact table, the optimizer never selects a push-down
hash join for the query, even if the fact table is included in the
IFMX_OPT_FACT_TABS list.
Important: This has no effect on existing tables. If you specify ROW as the
lock mode, the database will use this to restore, recover, or copy
data. For tables that were created in PAGE mode, this might cause
lock-table overflow or performance degradation.
IFX_DIRECTIVES
The IFX_DIRECTIVES environment variable setting determines whether the
optimizer allows query optimization directives from within a query. The
IFX_DIRECTIVES environment variable is set on the client.
You can specify either ON and OFF or 1 and 0 to set the environment variable.
setenv IFX_DIRECTIVES 1
0
You can specify either ON and OFF or 1 and 0 to set the environment variable.
setenv IFX_DIRECTIVES 1
0
Queries within a given client application can use external directives if both
the EXT_DIRECTIVES parameter in the configuration file of the database
server and the IFX_EXTDIRECTIVES environment variable setting on the
client system are both set to 1 or ON. If IFX_EXTDIRECTIVES is not set,
external directives are supported only if the ONCONFIG parameter
EXT_DIRECTIVES is set to 2. The following table summarizes the effect of
valid IFX_EXTDIRECTIVES and EXT_DIRECTIVES settings on support for
external optimizer directives.
Table 3-3. Effect of IFX_EXTDIRECTIVES and EXT_DIRECTIVES settings on external
directives
EXT_DIRECTIVES EXT_DIRECTIVES EXT_DIRECTIVES
=0 =1 =2
IFX_EXTDIRECTIVES OFF OFF ON
No setting
IFX_EXTDIRECTIVES OFF OFF OFF
0 = OFF
IFX_EXTDIRECTIVES OFF ON ON
1 = ON
When IFX_LONGID is set to zero, applications display only the first 18 bytes
of long identifiers, without indicating (by + ) that truncation has occurred.
If you set IFX_LONGID on the client, the setting affects only that client. If
you bring up the database server with IFX_LONGID set, all client
applications use that setting by default. If IFX_LONGID is set to different
values on the client and on the database server, however, the client setting
takes precedence.
Important: ESQL executables that have been built with the -static option
using the libos.a library version that does not support long
identifiers cannot use the IFX_LONGID environment variable.
You must recompile such applications with the new libos.a library
that includes support for long identifiers. Executables that use
shared libraries (no -static option) can use IFX_LONGID without
recompilation provided that they use the new libifos.so that
provides support for long identifiers. For details, see your ESQL
product manual.
size is the integer size (in bytes) for one network buffer.
The default size is 4 kilobytes (4,096 bytes). The maximum size is 64 kilobytes
(65,536 bytes) and the minimum size is 512 bytes. You can specify the value in
hexadecimal or decimal form.
For users who dislike viewing warning messages, this feature is an alternative
to redirecting the error output. Setting IFX_NO_TIMELIMIT_WARNING has
no effect, however, on when a time-limited license expires; the software ceases
to function at the same point in time when it would if this environment
variable had not been set. If you do set IFX_NO_TIMELIMIT_WARNING,
users will not see potentially annoying warnings about the impending license
If the setting were 1 in the previous example, however, the number of bytes
sent would be 255 bytes.
A NULL value (here meaning that IFX_UPDDESC is not set) disables the
describe-for-update feature. Any non-NULL value enables the feature.
IFX_XASTDCOMPLIANCE_XAEND
In earlier releases of IBM Informix database servers, an internal rollback of a
global transaction freed the transaction. In releases later than XPS 8.40 and
IDS 9.40, however, the default behavior after an internal rollback is not to free
the global transaction until an explicit rollback, as required by the X/Open
This environment variable can be particularly useful when the server instance
is disabled for new behaviour by the DISABLE_B162428_XA_FIX
configuration parameter, but one client requires the new behaviour. Setting
this environment varable to zero supports the new behaviour in the current
session.
IMCADMIN
The IMCADMIN environment variable supports the imcadmin administrative
tool by specifying the name of a database server through which imcadmin
can connect to MaxConnect. For imcadmin to operate correctly, you must set
IMCADMIN before you use an IBM Informix product.
setenv IMCADMIN dbservername
Here dbservername must be listed in the sqlhosts file on the computer where
the MaxConnect runs. MaxConnect uses this setting to obtain the following
connectivity information from the sqlhosts file:
v Where the administrative listener port must be established
v The network protocol that the specified database server uses
v The host name of the system where the specified database server resides
You cannot use the imcadmin tool unless IMCADMIN is set to a valid
database server name.
The database server can be either local or remote. On UNIX systems that
support the C shell, the IMCSERVER environment variable can be set by the
command.
setenv IMCSERVER dbservername
Here dbservername must be the name of a database server in the sqlhosts file.
For more information about sqlhosts settings with MaxConnect, see your
IBM Informix: Administrator's Guide. You cannot use MaxConnect unless
IMCSERVER is set to a valid database server name.
INFORMIXC (UNIX)
The INFORMIXC environment variable specifies the filename or pathname of
the C compiler to be used to compile files that IBM Informix ESQL/C
generates. The setting takes effect only during the C compilation stage.
Tip: On Windows, you pass either -mcc or -bcc options to the esql
preprocessor to use either the Microsoft or Borland C compilers.
For example, to specify the GNU C compiler, enter the following command:
setenv INFORMIXC gcc
Important: If you use gcc, be aware that the database server assumes that
strings are writable, so you need to compile using the
-fwritable-strings option. Failure to do so can produce
unpredictable results, possibly including core dumps.
INFORMIXCONCSMCFG (IDS)
The INFORMIXCONCSMCFG environment variable specifies the location of
the concsm.cfg file that describes communications support modules.
setenv INFORMIXCONCSMCFG pathname
You can also specify a different name for the file. The following example
specifies a filename of csmconfig in the same directory:
setenv INFORMIXCONCSMCFG /usr/myfiles/csmconfig
The default value for INFORMIXCONRETRY is one retry after the initial
connection attempt. The INFORMIXCONTIME setting, described in the
following section, takes precedence over the INFORMIXCONRETRY setting.
INFORMIXCONTIME
The INFORMIXCONTIME environment variable specifies for how many
seconds the CONNECT statement continues each attempt to establish a
connection to a database server before returning an error. If you set no value,
the default of 60 seconds can typically support a few hundred concurrent
client connections, but some systems might encounter very few connection
errors with a value as low as 15. The total distance between nodes, hardware
speed, the volume of traffic, and the concurrency level of the network can all
affect what value you should set to optimize INFORMIXCONTIME.
INFORMIXCPPMAP (IDS)
Set the INFORMIXCPPMAP environment variable to specify the fully
qualified pathname of the map file for C++ programs. Information in the map
file includes the database server type, the name of the shared library that
supports the database object or value object type, the library entry point for
the object, and the C++ library for which an object was built.
setenv INFORMIXCPPMAP pathname
pathname is the directory path where the C++ map file is stored.
The map file is a text file that can have any filename. You can specify several
map files, separated by colons ( : ) on UNIX or semicolons ( ; ) on Windows.
pathname is the directory path where the product files are installed.
INFORMIXKEYTAB (UNIX)
The INFORMIXKEYTAB environment variable specifies the location of the
keytab file. The keytab file contains authentication information that database
servers and clients access at connection time, if they use the DCE-GSS
communications support module (CSM). It contains key tables that store keys,
each of which contains a principal name (database server or user name), type,
version, and value.
The database server uses the keytab file to find the key to register the
database server and to acquire a credential for it. A client application uses the
key if the user did not execute dce_login with the current operating-system
user name (which is the same as the DCE principal name) or did not
explicitly provide a credential.
setenv INFORMIXKEYTAB pathname
For example, the following command specifies that the name and location of
the keytab file is /usr/myfiles/mykeytab:
setenv INFORMIXKEYTAB /usr/myfiles/mykeytab
kilobytes specifies the value you set for the optical memory cache.
For example, this command specifies the coral database server as the default:
setenv INFORMIXSERVER coral
The database server calculates the memory address where segments are
attached by multiplying the value of INFORMIXSHMBASE by 1,024. For
example, on a system that uses the C shell, you can set the memory address
to the value 0x800000 by entering the following command:
setenv INFORMIXSHMBASE 8192
For more information, see your IBM Informix: Administrator's Guide and the
IBM Informix: Administrator's Reference.
INFORMIXSQLHOSTS
The INFORMIXSQLHOSTS environment variable specifies where the SQL
client or the database server can find connectivity information.
setenv INFORMIXSQLHOSTS pathname
On UNIX systems, the default search path for the connectivity information file
is $INFORMIXDIR/etc/sqlhosts.
The following command overrides this default to specify the mysqlhosts file
in the /work/envt directory:
setenv INFORMIXSQLHOSTS /work/envt/mysqlhosts
The next example specifies that the client or database server look for
connectivity information on a computer named arizona:
set INFORMIXSQLHOSTS = \\arizona
size is an integer, setting the stack size (in kilobytes) for SQL client
threads.
If INFORMIXSTACKSIZE is not set, the stack size is taken from the database
server configuration parameter STACKSIZE or else defaults to a
platform-specific value. The default stack size value for the primary thread of
an SQL client is 32 kilobytes for nonrecursive database activity.
Warning: For instructions on setting this value, see the IBM Informix:
Administrator's Reference. If you incorrectly set the value of
INFORMIXSTACKSIZE, it can cause the database server to fail.
INFORMIXTERM (UNIX)
The INFORMIXTERM environment variable specifies whether DB–Access
should use the information in the termcap file or the terminfo directory.
The terminfo directory contains a file for each terminal name that has been
defined. The terminfo setting for INFORMIXTERM is supported only on
computers that provide full support for the UNIX System V terminfo library.
For details, see the machine notes file for your product.
INF_ROLE_SEP (IDS)
The INF_ROLE_SEP environment variable configures the security feature of
role separation when the database server is installed or reinstalled on UNIX
systems. Role separation enforces separating administrative tasks by people
who run and audit the database server. After the installation is complete,
INF_ROLE_SEP has no effect. If INF_ROLE_SEP is not set, then user
informix (the default) can perform all administrative tasks.
setenv INF_ROLE_SEP n
On Windows, the install process asks whether you want to enable role
separation regardless of the setting of INF_ROLE_SEP. To enable role
separation for database servers on Windows, choose the role-separation option
during installation.
On UNIX, you can establish role separation manually by changing the group
that owns the aaodir, dbsadir, or etc directories at any time after the
installation is complete. You can disable role separation by resetting the group
that owns these directories to informix. You can have role separation enabled,
for example, for the Audit Analysis Officer (AAO) without having role
separation enabled for the Database Server Administrator (DBSA).
For more information about the security feature of role separation, see the
IBM Informix: Trusted Facility Guide. To learn how to configure role separation
when you install your database server, see your IBM Informix: Installation
Guide.
If ISM_ENCRYPTION is set to NONE or is not set, the ISM server does not
use encryption.
This directory must have read and write permissions for the user who brings
up the database server. If the JAR_TEMP_PATH environment variable is not
set, temporary copies of .jar files are stored in the /tmp directory of the local
file system for the database server.
JAVA_COMPILER (IDS)
You can set the JAVA_COMPILER environment variable in the Java virtual
machine environment to disable JIT compilation.
setenv JAVA_COMPILER none
NONE
The NONE and none settings are equivalent. On UNIX systems that support the
C shell and on which JAVA_COMPILER has been set to NONE or none, you can
enable the JIT compiler for the JVM environment by the following command:
unset JAVA_COMPILER
JVM_MAX_HEAP_SIZE (IDS)
The JVM_MAX_HEAP_SIZE environment variable can set a non-default
upper limit on the size of the heap for the Java virtual machine.
For example, the following command sets the maximum heap size at 12 MB:
set JVM_MAX_HEAP_SIZE 12
LIBERAL_MATCH (XPS)
The LIBERAL_MATCH environment variable allows the database server to
ignore trailing blanks when the LIKE and MATCHES operators occur in SQL
statements that compare two column values.
setenv LIBERAL_MATCH
When this environment variable is set, the database server ignores trailing
blanks in a LIKE or MATCHES condition. For example, if LIBERAL_MATCH
is set, and you specify “M LIKE P” when P contains trailing blank spaces that
do not occur in M, the result is TRUE. When this environment variable is not
set, the database server returns FALSE for string comparisons like this that
differ only in trailing blank characters.
For more information about the LIKE and MATCHES operators, refer to the
IBM Informix: Guide to SQL Syntax.
LIBPATH (UNIX)
The LIBPATH environment variable tells the shell on AIX systems which
directories to search for dynamic-link libraries for the INTERSOLV DataDirect
ODBC Driver. You must specify the full pathname for the directory where you
installed the product.
:
The yes setting is case sensitive, and is also sensitive to leading and trailing
blank spaces. Including uppercase letters or blank spaces in the setting is
equivalent to leaving NODEFDAC unset. When NODEFDAC is not set, or if
it is set to any value besides yes, default privileges on tables and
Owner-mode UDRs are granted to PUBLIC by default when the table or UDR
is created in a database that is not ANSI-compliant.
ONCONFIG
The ONCONFIG environment variable specifies the name of the active file
that holds configuration parameters for the database server. This file is read as
To prepare the ONCONFIG file, make a copy of the onconfig.std file and
modify the copy. It is recommended that you name the ONCONFIG file so
that it can easily be related to a specific database server. If you have multiple
instances of a database server, each instance must have its own uniquely
named ONCONFIG file.
To prepare the ONCONFIG file for Extended Parallel Server, make a copy of
the onconfig.std file if you are using a single coserver configuration or make
a copy of the onconfig.xps file if you are using a multiple coserver
configuration. You can use the onconfig.std file for a multiple coserver
configuration, but you would have to add additional keywords and
configuration parameters such as END, NODE, and COSERVER, which are
already provided for you in the onconfig.xps file.
If the ONCONFIG environment variable is not set, the database server uses
configuration values from either the $ONCONFIG file or the
$INFORMIXDIR/etc/onconfig file.
The default value is 0 (zero), which explicitly disables message chaining. You
might wish, for example, to disable optimized message transfers for
statements that require immediate replies, for debugging, or to ensure that the
database server processes all messages before the application terminates.
When you set OPTMSG within an application, you can activate or deactivate
optimized message transfers for each connection or within each thread. To
enable optimized message transfers, you must set OPTMSG before you
establish a connection.
For more information about setting OPTMSG and defining related global
variables, see the IBM Informix: ESQL/C Programmer's Manual.
OPTOFC
Set the OPTOFC environment variable to enable optimize-OPEN-FETCH-
CLOSE functionality in an IBM Informix ESQL/C application or other APIs
(such as JDBC, ODBC, OLE DB, LIBDMI, and Lib C++) that use DECLARE
and OPEN statements to execute a cursor.
If you set OPTOFC from the shell, you must set it before you start the
ESQL/C application. For more information about enabling OPTOFC and
related features, see the IBM Informix: ESQL/C Programmer's Manual.
OPT_GOAL (IDS, UNIX)
Set the OPT_GOAL environment variable in the user environment, before you
start an application, to specify the query performance goal for the optimizer.
-1
setenv OPT_GOAL 0
The default behavior is for the optimizer to choose query plans that optimize
the total query time.
You can also specify the optimization goal for individual queries with
optimizer directives or for a session with the SET OPTIMIZATION statement.
For more information about optimizing queries for your database server, see
your IBM Informix: Performance Guide. For information on the SET
OPTIMIZATION statement, see the IBM Informix: Guide to SQL Syntax.
PATH
The UNIX PATH environment variable tells the shell which directories to
search for executable programs. You must add the directory containing your
IBM Informix product to your PATH setting before you can use the product.
You can specify the search path in various ways. The PATH environment
variable tells the operating system where to search for executable programs.
You must include the directory that contains your IBM Informix product in
your path setting before you can use the product. This directory should
appear before $INFORMIXDIR/bin, which you must also include.
For additional information about how to modify your path, see “Modifying an
Environment-Variable Setting” on page 3-8.
PDQPRIORITY
For Dynamic Server, the PDQPRIORITY environment variable determines the
degree of parallelism that the database server uses and affects how the
database server allocates resources, including memory, processors, and disk
reads.
Notes:
1 Extended Parallel Server only
resources Is an integer in the range 0 to 100. Value 1 is the same as
LOW.
Value 0 is the same as OFF (for Dynamic Server only).
high_value Optional integer value that requests the maximum percentage
of memory (for Extended Parallel Server only). When you
specify this value after the resources value, you request a range
of memory, expressed as a percentage.
Here the HIGH, LOW, and OFF keywords have the following effects:
Usually, the more resources a database server uses, the better its performance
for a given query. If the server uses too many resources, however, contention
for the resources can take resources away from other queries, resulting in
degraded performance. For more information on performance considerations
for PDQPRIORITY, refer to your IBM Informix: Performance Guide.
When the PDQPRIORITY environment variable is not set, the default value is
the value of the PDQPRIORITY configuration parameter.
filename specifies the simple filename of the configuration file that the
High-Performance Loader uses.
For more information, see the IBM Informix: High-Performance Loader User's
Guide.
PLOAD_LO_PATH (IDS)
The PLOAD_LO_PATH environment variable lets you specify the pathname
for smart-large-object handles (which identify the location of smart large
objects such as BLOB and CLOB data types).
setenv PLOAD_LO_PATH pathname
For more information, see the IBM Informix: High-Performance Loader User's
Guide.
PLOAD_SHMBASE (IDS)
The PLOAD_SHMBASE environment variable lets you specify the
shared-memory address at which the High-Performance Loader (HPL)
onpload processes will attach. If PLOAD_SHMBASE is not set, the HPL
determines which shared-memory address to use.
setenv PLOAD_SHMBASE value
Tip: It is recommended that you let the HPL decide where to attach and that
you set PLOAD_SHMBASE only if necessary to avoid shared-memory
collisions between onpload and the database server.
For more information, see the IBM Informix: High-Performance Loader User's
Guide.
PSORT_DBTEMP
The PSORT_DBTEMP environment variable specifies where the database
server writes the temporary files it uses when it performs a sort.
:
The database server uses the directory that PSORT_DBTEMP specifies, even
if the environment variable PSORT_NPROCS is not set. For additional
information about the PSORT_DBTEMP environment variable, see your
IBM Informix: Administrator's Guide and your IBM Informix: Performance Guide.
Before the sorting package performs a parallel sort, make sure that the
database server has enough memory for the sort.
setenv PSORT_NPROCS threads
If PSORT_NPROCS is not set, or if it is set to 0, you get two sort threads for
each fragment of the index unless you have a single-CPU virtual processor. If
you have a single-CPU virtual processor, you get one sort thread for each
fragment of the index.
For spatial queries, the I/O overhead tends to exceed by far the CPU cost, so
by multiplying the uncorrected estimated cost by an appropriate value from
this setting, the database server can make better cost-based decisions on how
to implement queries on UDT columns for which an R-tree index exists.
SHLIB_PATH (UNIX)
The SHLIB_PATH environment variable tells the shell on HP-UX systems
which directories to search for dynamic-link libraries. This is used, for
example, with the INTERSOLV DataDirect ODBC Driver. You must specify the
full pathname for the directory where you installed the product.
:
Set the STMT_CACHE environment variable for applications that do not use
the SET STMT_CACHE statement to control the use of the SQL statement
cache. By default, a statement cache of 512 kilobytes is enabled, but this
feature can be disabled or set to a non-default size through the
STMT_CACHE parameter of the onconfig.std file or by the SET
STMT_CACHE statement.
This environment variable has no effect if the SQL statement cache is disabled
through the configuration file setting. Values set by the SET STMT_CACHE
statement in the application override the STMT_CACHE setting.
TERM (UNIX)
The TERM environment variable is used for terminal handling. It lets
DB–Access (and other character-based applications) recognize and
communicate with the terminal that you are using.
setenv TERM type
The terminal type specified in the TERM setting must correspond to an entry
in the termcap file or terminfo directory.
Before you can set the TERM environment variable, you must obtain the code
for your terminal from the database administrator.
For example, to specify the vt100 terminal, set the TERM environment
variable by entering the following command:
setenv TERM vt100
TERMCAP (UNIX)
The TERMCAP environment variable is used for terminal handling. It tells
DB–Access (and other character-based applications) to communicate with the
termcap file instead of the terminfo directory.
setenv TERMCAP pathname
You can use set TERMCAP in any of the following ways. If several termcap
files exist, they have the following (descending) order of precedence:
1. The termcap file that you create
2. The termcap file that the database server supplies (that is,
$INFORMIXDIR/etc/termcap)
3. The operating-system termcap file (that is, /etc/termcap)
If you do not set the TERMCAP environment variable, the system file (that is,
/etc/termcap) is used by default.
TERMINFO (UNIX)
The TERMINFO environment variable is used for terminal handling.
If you set the TERMINFO environment variable, you must also set the
INFORMIXTERM environment variable to terminfo.
THREADLIB (UNIX)
Use the THREADLIB environment variable to compile multithreaded
ESQL/C applications. A multithreaded ESQL/C application lets you establish
as many connections to one or more databases as there are threads. These
connections can remain active while the application program executes.
The xfer_config file works with the onxfer utility to help users migrate from
Version 7.x to Version 8.x. It contains various configuration parameter
settings that users can modify and a list of tables that users can select to be
transferred.
The term GLS Guide in the Page column in Table 3-4 indicates environment
variables that are described in the IBM Informix: GLS User's Guide.
The term ER Guide in the Page column in Table 3-4 indicates environment
variables that are described in the IBM Informix: Dynamic Server Enterprise
Replication Guide.
Table 3-4. Uses for Environment Variables
Topic Environment Variable Page
Abbreviated year values DBCENTURY 3-22
Alarms for SQL operations
Globally detached indexes GLOBAL_DETACH_INFRM 3-45
Cartesian joins IFMX_CART_ALARM 3-46
ANSI/ISO SQL compliance
Lettercase of owner names ANSIOWNER 3-18
Informix syntax extensions DBANSIWARN 3-21
default table privileges NODEFDAC 3-68
For information on how to create and populate the stores_demo database, see
the IBM Informix: DB–Access User's Guide. For information on how to design
and implement a relational database, see the IBM Informix: Database Design
and Implementation Guide.
Sections that follow describe each table. The unique identifying value for each
table (primary key) is shaded.
The customer Table
The customer table contains information about the retail stores that place
orders from the distributor. Table A-1 shows the columns of the customer
table.
The zipcode column in Table A-1 is indexed and allows duplicate values.
Table A-1. The customer Table
Column Name Data Type Description
customer_num SERIAL(101) System-generated customer number
fname CHAR(15) First name of store representative
lname CHAR(15) Last name of store representative
company CHAR(20) Name of store
address1 CHAR(20) First line of store address
address2 CHAR(20) Second line of store address
city CHAR(15) City
state CHAR(2) State (foreign key to state table)
zipcode CHAR(5) Zipcode
phone CHAR(18) Telephone number
The stock table is a catalog of the items sold by the distributor. Table A-4 on
page A-4 shows the columns of the stock table.
code zipcode
sname phone
According to Figure A-2, customer 104 (Anthony Higgins) has placed two
orders, as his customer number appears in two rows of the orders table.
Because the customer number is a foreign key in the orders table, you can
retrieve Anthony Higgins’s name, address, and information about his orders
at the same time.
The orders and items Tables
The orders and items tables are linked by an order_num column that contains
an identification number for each order. If an order includes several items, the
same order number appears in several rows of the items table. In the items
The same stock number and manufacturer code can appear in more than one
row of the items table, if the same item belongs to separate orders. In the
items table, the stock_num and manu_code columns are foreign keys that
reference the stock_num and manu_code columns in the stock table.
Figure A-4 on page A-10 shows this relationship.
Figure A-4. Tables That the stock_num and manu_code Columns Join
Figure A-5. Tables That the stock_num and manu_code Columns Join
manu_code manu_name
NRG Norge
HSK Husky
HRO Hero
code sname
AK Alaska
AL Alabama
AR Arkansas
AZ Arizona
CA California
Figure A-9. Relationship Between the state Column and the code Column
company
address1
address2
zipcode
fname
phone
lname
state
city
101 Ludwig Pauli All Sports 213 Erstwild Sunnyvale CA 94086 408-
Supplies Court 789-
8075
102 Carole Sadler Sports Spot 785 Geary San CA 94117 415-
Street Francisco 822-
1289
103 Philip Currie Phil’s 654 Poplar P. O. Box Palo Alto CA 94303 650-
Sports 3498 328-
4543
company
address1
address2
zipcode
fname
phone
lname
state
city
104 Anthony Higgins Play Ball! East 422 Bay Redwood CA 94026 650-
Shopping Road City 368-
Center 1100
105 Raymond Vector Los Altos 1899 La Los Altos CA 94022 650-
Sports Loma Drive 776-
3249
106 George Watson Watson & 1143 Carver Mountain CA 94063 650-
Son Place View 389-
8789
107 Charles Ream Athletic 41 Jordan Palo Alto CA 94304 650-
Supplies Avenue 356-
9876
108 Donald Quinn Quinn’s 587 Alvarado Redwood CA 94063 650-
Sports City 544-
8729
109 Jane Miller Sport Stuff Mayfair Mart 7345 Ross Sunnyvale CA 94086 408-
Blvd. 723-
8789
110 Roy Jaeger AA 520 Topaz Redwood CA 94062 650-
Athletics Way City 743-
3611
111 Frances Keyes Sports 3199 Sterling Sunnyvale CA 94085 408-
Center Court 277-
7245
112 Margaret Lawson Runners & 234 Los Altos CA 94022 650-
Others Wyandotte 887-
Way 7235
113 Lana Beatty Sportstown 654 Oak Menlo Park CA 94025 650-
Grove 356-
9982
114 Frank Albertson Sporting 947 Waverly Redwood CA 94062 650-
Place Place City 886-
6677
115 Alfred Grant Gold Medal 776 Gary Menlo Park CA 94025 650-
Sports Avenue 356-
1123
company
address1
address2
zipcode
fname
phone
lname
state
city
116 Jean Parmelee Olympic 1104 Spinosa Mountain CA 94040 650-
City Drive View 534-
8822
117 Arnold Sipes Kids 850 Lytton Redwood CA 94063 650-
Korner Court City 245-
4578
118 Dick Baxter Blue 5427 College Oakland CA 94609 650-
Ribbon 655-
Sports 0011
119 Bob Shorter The 2405 Kings Cherry Hill NJ 08002 609-
Triathletes Highway 663-
Club 6079
120 Fred Jewell Century 6627 N. 17th Phoenix AZ 85016 602-
Pro Shop Way 265-
8754
121 Jason Wallack City Sports Lake 350 W. Wilmington DE 19898 302-
Biltmore Mall 23rd 366-
Street 7511
122 Cathy O’Brian The 543 Nassau Princeton NJ 08540 609-
Sporting Street 342-
Life 0054
123 Marvin Hanlon Bay Sports 10100 Bay Suite 1020 Jacksonville FL 32256 904-
Meadows 823-
Road 4239
124 Chris Putnum Putnum’s 4715 S.E. Suite Bartlesville OK 74006 918-
Putters Adams Blvd 909C 355-
2074
125 James Henry Total 1450 Brighton MA 02135 617-
Fitness Common- 232-
Sports wealth 4159
Avenue
126 Eileen Neelie Neelie’s 2539 South Denver CO 80219 303-
Discount Utica Street 936-
Sports 7731
127 Kim Satifer Big Blue Blue Island 12222 Blue Island NY 60406 312-
Bike Shop Square Gregory 944-
Street 5691
company
address1
address2
zipcode
fname
phone
lname
state
city
128 Frank Lessor Phoenix Athletic 1817 N. Phoenix AZ 85008 602-
University Department Thomas 533-
Road 1817
items Table
item_num order_num stock_num manu_code quantity total_price
1 1001 1 HRO 1 250.00
1 1002 4 HSK 1 960.00
2 1002 3 HSK 1 240.00
1 1003 9 ANZ 1 20.00
2 1003 8 ANZ 1 840.00
3 1003 5 ANZ 5 99.00
1 1004 1 HRO 1 250.00
2 1004 2 HRO 1 126.00
3 1004 3 HSK 1 240.00
4 1004 1 HSK 1 800.00
1 1005 5 NRG 10 280.00
2 1005 5 ANZ 10 198.00
3 1005 6 SMT 1 36.00
4 1005 6 ANZ 1 48.00
1 1006 5 SMT 5 125.00
2 1006 5 NRG 5 140.00
3 1006 5 ANZ 5 99.00
4 1006 6 SMT 1 36.00
5 1006 6 ANZ 1 48.00
1 1007 1 HRO 1 250.00
2 1007 2 HRO 1 126.00
3 1007 3 HSK 1 240.00
4 1007 4 HRO 1 480.00
5 1007 7 HRO 1 600.00
call_type Table
call_code code_descr
B billing error
D damaged goods
I incorrect merchandise sent
L late shipment
O other
orders Table
customer_num
ship_instruct
ship_weight
ship_charge
order_num
order_date
paid_date
ship_date
po_num
backlog
ship_instruct
ship_weight
ship_charge
order_num
order_date
paid_date
ship_date
po_num
backlog
stock Table
stock_num manu_code description unit_rice unit unit_descr
1 HRO baseball gloves 250.00 case 10 gloves/case
1 HSK baseball gloves 800.00 case 10 gloves/case
catalog Table
catalog stock manu cat_descr cat_picture cat_advert
_num _num _code
10001 1 HRO Brown leather. Specify first <BYTE Your First Season’s
baseman’s or infield/outfield value> Baseball Glove
style. Specify right- or
left-handed.
10002 1 HSK Babe Ruth signature glove. <BYTE All-Leather,
Black leather. Infield/outfield value> Hand-Stitched,
style. Specify right- or Deep-Pockets, Sturdy
left-handed. Webbing that Won’t Let
Go
10003 1 SMT Catcher’s mitt. Brown leather. <BYTE A Sturdy Catcher’s Mitt
Specify right- or left-handed. value> With the Perfect Pocket
10004 2 HRO Jackie Robinson signature <BYTE Highest Quality Ball
glove. Highest Professional value> Available, from the
quality, used by National Hand-Stitching to the
League. Robinson Signature
10005 3 HSK Pro-style wood. Available in <BYTE High-Technology Design
sizes: 31, 32, 33, 34, 35. value> Expands the Sweet Spot
10006 3 SHM Aluminum. Blue with black <BYTE Durable Aluminum for
tape. 31″, 20 oz or 22 oz; 32″, value> High School and
21 oz or 23 oz; 33″, 22 oz or 24 Collegiate Athletes
oz.
10007 4 HSK Norm Van Brocklin signature <BYTE Quality Pigskin with
style. value> Norm Van Brocklin
Signature
10008 4 HRO NFL-Style pigskin. <BYTE Highest Quality Football
value> for High School and
Collegiate Competitions
cust_calls Table
customer call_ user_id call_ call_descr res_dtime res_descr
_num dtime code
106 1998- maryj D Order was received, 1998-06-12 Authorized credit for two
06-12 but two of the cans 8:25 cans to customer, issued
8:20 of ANZ tennis balls apology. Called ANZ
within the case were buyer to report the QA
empty. problem.
110 1998- richc L Order placed one 1998-07-07 Checked with shipping
07-07 month ago (6/7) not 10:30 (Ed Smith). Order sent
10:24 received. yesterday- we were
waiting for goods from
ANZ. Next time will call
with delay if necessary.
119 1998- richc B Bill does not reflect 1998-07-02 Spoke with Jane Akant in
07-01 credit from previous 8:21 Finance. She found the
15:00 order. error and is sending new
bill to customer.
manufact Table
manu_code manu_name lead_time
ANZ Anza 5
HSK Husky 5
HRO Hero 4
NRG Norge 7
SMT Smith 3
SHM Shimara 30
KAR Karsten 21
NKL Nikolus 8
PRC ProCycle 9
Dynamic Server
For information on how to create and populate the demonstration databases, including
relevant SQL files, see the IBM Informix: DB–Access User's Guide. For conceptual information
about demonstration databases, see the IBM Informix: Database Design and Implementation
Guide.
To create the sales_demo database, you must first create the stores_demo
database with the logging option. Once you create the stores_demo database,
you can execute the scripts that create and load the sales_demo database from
DB–Access. The files are named createdw.sql and loaddw.sql.
Product Time
Dimension Dimension
product code time code
product name
vendor order date
Fact Table: Sales month code
vendor name
product line product code month name
product line name quarter code
time code quarter name
District code year
customer code
revenue
cost
Geography units sold Customer
Dimension net profit Dimension
district code customer code
district customer name
state company name
state name
region
For information on how to create and populate the sales_demo database, see
the IBM Informix: DB–Access User's Guide. For information on how to design
and implement dimensional databases, see the IBM Informix: Database Design
and Implementation Guide. For information on the stores_demo database, see
Appendix A
The next section describes the schema of these five tables, and identifies the
column in the fact table that logically associates each dimension table to the
fact table.
Structure of the sales_demo Tables
The sales_demo database includes the following tables:
v customer
v geography
v product
v sales
v time
The following sections describe the column names, data types, and column
descriptions for each table. A SERIAL field serves as the primary key for the
district_code column of the geography table. The primary and foreign key
relationships that exist between the fact (sales) table and its dimension tables
are not defined, however, because data-loading performance improves
dramatically when the database server does not enforce constraint checking.
The superstores_demo database uses the default locale and is not ANSI
compliant.
This section lists the names, data types, and descriptions of the columns for
each table in the superstores_demo database. The unique identifying value for
each table (primary key) is shaded. Columns that represent extended data
types are discussed in “User-Defined Routines and Extended Data Types” on
page B-16. Primary-foreign key relationships between the tables are outlined
in “Referential Relationships” on page B-19.
For information about table hierarchies, see the IBM Informix: Database Design
and Implementation Guide.
A UDR is a routine that you define that can be invoked within an SQL
statement or another UDR. A UDR can either return values or not.
The data type system of Dynamic Server is an extensible and flexible system
that supports the creation of following kinds of data types:
v Extensions of existing data types, by redefining some of the behavior for
data types that the database server provides
v Definitions of customized data types by a user
location_t definition
location_id SERIAL
loc_type CHAR(2)
company VARCHAR(20)
street_addr LIST(VARCHAR(25) NOT NULL)
city VARCHAR(25)
country VARCHAR(25)
loc_us_t definition
state_code CHAR(2)
zip ROW(code INTEGER, suffix SMALLINT)
phone CHAR(18)
loc_non_us_t definition
province_code CHAR(2)
zipcode CHAR(9)
phone CHAR(15)
name_t definition
first VARCHAR(15)
last VARCHAR(15)
retail_t definition
credit_num CHAR(19)
expiration DATE
whlsale_t definition
resale_license CHAR(15)
terms_net SMALLINT
ship_t definition
date DATE
weight DECIMAL(8,2)
charge MONEY(6,2)
instruct VARCHAR(40)
Table Hierarchies
Figure B-2 shows how the hierarchical tables of the superstores_demo
database are related. See “The customer and location Tables” on page B-20 for
an explanation of the foreign key and primary relationships between those
two tables, which are indicated by shaded arrows that point from the
customer.custnum and customer.loc columns to the location.location_id
columns in the following diagram.
customer
customer_num location
customer_type location_id
customer_name loc_type
customer_loc company
contact_dates street_addr
cust_discount city
credit_status country
Each line starts with a dotted decimal number; for example, 3 or 3.1 or 3.1.1.
To hear these numbers correctly, make sure that your screen reader is set to
read punctuation. All syntax elements that have the same dotted decimal
number (for example, all syntax elements that have the number 3.1) are
mutually exclusive alternatives. If you hear the lines 3.1 USERID and 3.1
SYSTEMID, your syntax can include either USERID or SYSTEMID, but not both.
The dotted decimal numbering level denotes the level of nesting. For example,
if a syntax element with dotted decimal number 3 is followed by a series of
syntax elements with dotted decimal number 3.1, all the syntax elements
numbered 3.1 are subordinate to the syntax element numbered 3.
Certain words and symbols are used next to the dotted decimal numbers to
add information about the syntax elements. Occasionally, these words and
symbols might occur at the beginning of the element itself. For ease of
identification, if the word or symbol is a part of the syntax element, the word
or symbol is preceded by the backslash (\) character. The * symbol can be
used next to a dotted decimal number to indicate that the syntax element
repeats. For example, syntax element *FILE with dotted decimal number 3 is
read as 3 \* FILE. Format 3* FILE indicates that syntax element FILE repeats.
Format 3* \* FILE indicates that syntax element * FILE repeats.
The following words and symbols are used next to the dotted decimal
numbers:
? Specifies an optional syntax element. A dotted decimal number
followed by the ? symbol indicates that all the syntax elements with a
corresponding dotted decimal number, and any subordinate syntax
elements, are optional. If there is only one syntax element with a
dotted decimal number, the ? symbol is displayed on the same line as
the syntax element (for example, 5? NOTIFY). If there is more than one
syntax element with a dotted decimal number, the ? symbol is
displayed on a line by itself, followed by the syntax elements that are
optional. For example, if you hear the lines 5 ?, 5 NOTIFY, and 5
UPDATE, you know that syntax elements NOTIFY and UPDATE are
optional; that is, you can choose one or none of them. The ? symbol is
equivalent to a bypass line in a railroad diagram.
! Specifies a default syntax element. A dotted decimal number followed
by the ! symbol and a syntax element indicates that the syntax
element is the default option for all syntax elements that share the
same dotted decimal number. Only one of the syntax elements that
share the same dotted decimal number can specify a ! symbol. For
example, if you hear the lines 2? FILE, 2.1! (KEEP), and 2.1
(DELETE), you know that (KEEP) is the default option for the FILE
keyword. In this example, if you include the FILE keyword but do not
specify an option, default option KEEP is applied. A default option also
applies to the next higher dotted decimal number. In this example, if
the FILE keyword is omitted, default FILE(KEEP) is used. However, if
you hear the lines 2? FILE, 2.1, 2.1.1! (KEEP), and 2.1.1 (DELETE),
the default option KEEP only applies to the next higher dotted
decimal number, 2.1 (which does not have an associated keyword),
and does not apply to 2? FILE. Nothing is used if the keyword FILE is
omitted.
* Specifies a syntax element that can be repeated zero or more times. A
dotted decimal number followed by the * symbol indicates that this
syntax element can be used zero or more times; that is, it is optional
and can be repeated. For example, if you hear the line 5.1*
data-area, you know that you can include more than one data area or
application process. The process that manages ASF. Acronym for Associated Services Facility.
an ESQL or other program at runtime. It executes The ASF code in IBM Informix products controls
the program logic and initiates SQL requests. the connections between client applications and
Memory that is allocated for program variables, database servers. Software architects use this
program data, and the fetch buffer is part of this term; most users of IBM Informix products see
process. See also database server process. this term only in occasional error messages.
Glossary D-3
branch node. An index page that contains row that is deleted from the parent table. When
pointers to a leaf node or other branch nodes. any rows are deleted from the primary key
The database server creates a branch node when column of a table, cascading deletes, if enabled,
the root node and subsequent leaf nodes become delete identical information from any foreign-key
full. column in a related table.
buffer. A portion of computer memory where a case sensitivity. The condition of distinguishing
program temporarily stores data. Data typically between uppercase and lowercase letters.
is read into or written out from buffers to disk. Case-sensitive commands and command options
react differently to the same letters entered as
buffered disk I/O. Disk I/O that is controlled uppercase or lowercase characters. The locale
by the operating system instead of by an files specify which characters (if any) of a code
application. With buffered disk I/O, the set are uppercase or lowercase.
operating system stores data in the kernel
portion of memory before periodically writing cast. A database object that converts one data
the data to disk. See also unbuffered disk I/O and type to another. Most built-in data types have
disk I/O. built-in casts (that is, system-defined casts) to
compatible data types. See also user-defined cast,
buffered logging. A type of logging that holds explicit cast, and implicit cast.
transactions in a memory buffer until the buffer
is full, regardless of when the transaction is cast function. A user-defined function that
committed or rolled back. Informix database implements a cast. The function must be
servers provide this option to speed up registered with the CREATE CAST statement
operations by reducing the number of disk before it can be used.
writes.
character. A logical unit of storage for a code
built-in. Provided by the database server, point. A character is equal to one or more bytes
usually in the system catalog; not defined by the and can be numeric, alphabetic, or a
user. nonprintable character (such as a control
character). See also multibyte character and
built-in data type. A predefined data type that single-byte character.
the database server supports; for example,
INTEGER, CHAR, or SERIAL. character set. One or more natural-language
alphabets, together with additional symbols for
byte. An physical computer storage unit of 8 digits, punctuation, ligatures, diacritical marks,
bits. A character is not necessarily one byte. In a and whitespace. (A natural language is a written
multibyte code set, a character can require more language that human beings use to communicate
than one byte. with each other, such as English, Chinese, or
German.) See also code set.
BYTE. A data type for a simple large object that
stores any type of binary data and can be as character special device. See unbuffered disk
large as 231 bytes. See also TEXT. I/O.
Cartesian product. The set that results when check constraint. A logical condition that must
you pair each and every member of one set with be satisfied before data values can be entered
each and every member of another set. A into a column of a database table during an
Cartesian product results from a multiple-table INSERT or UPDATE statement.
query when you do not specify the joining
conditions among tables. See also join. checkpoint. A point during a database server
operation when the pages on disk are
cascading deletes. Deletion of rows from a child
table that were associated by foreign key to a
child table. The referencing table in a referential close a database. To deactivate the connection
constraint. See also parent table. between a client application and a database.
Only one database can be active at a time.
chunk. The largest contiguous section of disk
space available for a database server. A specified close a file. To deactivate the association
set of chunks defines a dbspace or blobspace. A between a file and a program.
database server administrator allocates a chunk
to a dbspace or blobspace when that dbspace or cluster an index. To rearrange the physical data
blobspace approaches full capacity. A chunk of a table according to a specific index.
contains a certain number of pages. (Extended
Parallel Server does not support blobspace cluster key. The column in a table that logically
chunks.) relates a group of simple large objects or smart
large objects that are stored in an optical cluster.
client application. A program that requests
services from a server program, typically a file clustersize. The amount of space, specified in
server or a database server. For the GLS feature, kilobytes, that is allocated to an optical cluster on
the term client application includes database an optical volume.
server utilities.
code point. A bit pattern that represents one
client computer. The computer on which a character in a code set. For example, in the ASCII
client application runs. code set, the uppercase A character has a code
point of 0x41.
client locale. The locale that a client application
uses to perform read and write operations on the code set. The representation of a character set
client computer. The CLIENT_LOCALE that specifies how to map each element of a
environment variable can specify a nondefault character set to a unique code point. For
locale. See also server locale. example, ASCII, ISO8859-1, Microsoft 1252, and
EBCDIC are code sets to represent the English
client/server architecture. A hardware and language. A locale name specifies a code set.
software design that allows the user interface
and database server to reside on separate nodes code-set conversion. The process of converting
or platforms on a single computer or over a character data from one code set (the source code
network. See also ASF, client application, and set) to another (the target code set). Code-set
server-processing locale. conversion is useful when the client and server
computers use different code sets to represent the
client/server connection statements. The SQL same character data.
statements that can make connections with
databases. These statements include CONNECT, code-set order. The serialized order of
DISCONNECT, and SET CONNECTION. characters within a code set. For example, in the
ASCII code set, uppercase characters (A through
CLOB. Acronym for character large object. A Z) are ordered before lowercase characters (a
data type for a smart large object that stores through z). See also collation order and localized
large text items, such as PostScript or HTML order.
files. These objects can be stored and retrieved in
pieces and have database properties such as cogroup. A named group of coservers. At
recovery and transaction rollback. See also BLOB. initialization, the database server creates a
cogroup that is named cogroup_all from all
configured coservers.
Glossary D-5
collating sequence. See collation order, code-set collocated join. A join that occurs locally on the
order, and localized order. coserver where the data resides. The local
coserver sends the data to the other coservers
collation. The process of sorting character after the join is complete.
strings according to some order. The term is
sometimes used as a synonym for collation order column. A data element that contains a
or for localized order. specified type of information that occurs in every
row of the table. Also known as a display label or
collation order. The logical order in which the a field. See also row.
character-string values in a database are sorted
and indexed. This is based on either the order of column expression. An expression that includes
the code set or else some locale-specific order. a column name and optionally uses column
Collating order is also known as collating subscripts to define a column substring.
sequence.
column subscript. A subscript (an integer
collection. An instance of acollection data type; enclosed between brackets) in a column
a group of elements of the same data type stored expression, showing the ordinal position of a
in a SET, MULTISET, or LIST. byte within the column value. Two integers,
separated by a comma, as in col2[3,9], define a
collection cursor. A database cursor that has an column substring.
IBM Informix ESQL/C collection variable
associated with it and provides access to the column substring. A substring of a character
individual elements of a column whose data type column. For example, the column expression
is a collection data type. col2[3,9]specifies a 7-byte substring of col2 that
begins with the 3rd byte.
collection data type. A complex data type
whose instances are groups of elements of the command file. A system file that contains one
same data type, which can be any opaque data type, or more statements or commands, such as SQL
distinct data type, built-in data type, collection data statements.
type, or row type.
comment. Information in a program file that is
collection-derived table. A table that not processed by the computer but that
IBM Informix ESQL/C or SPL creates for a documents the program. Special characters such
collection column when it encounters the TABLE as the sharp sign ( # ), braces ( { } ), slash mark
keyword in an INSERT, DELETE, UPDATE, or followed by asterisk ( / * ), or a double hyphen (
SELECT statement. ESQL/C and SPL store this -- ) can be used to identify comments, depending
table in a collection variable to access elements of on the programming context.
the collection as rows of the collection-derived
table. commit work. To complete a transaction by
accepting all changes to the database since the
collection subquery. A query that takes the beginning of the transaction. See also roll back.
result of a subquery and turns it into a
expression by using the MULTISET keyword to Committed Read. An Informix level of isolation
convert returned values into a MULTISET in which the user can view only rows that are
collection. currently committed at the moment when the
query is requested; the user cannot view rows
collection variable. An IBM Informix ESQL/C that were changed as a part of a currently
host variable or SPL variable that holds an entire uncommitted transaction. Committed Read is
collection and provides access, through a collection available through a database server and set with
cursor, to the individual elements of the collection. the SET ISOLATION statement. It is the default
level of isolation for databases that are not ANSI
compliant. See also Read Committed.
compile. To translate source code (in a configuration file. A file read during database
high-level language) into executable code. server disk or shared-memory initialization that
Compare with execute and link. See also source contains the parameters that specify values for
file. configurable behavior. Database server and its
archiving tool use configuration files.
compile-time error. An error that occurs when
you compile the program source code. This type connection. A logical association between two
of error indicates syntax errors in the source applications or between an application and a
code. Compare with runtime error. database environment, created by a CONNECT
or DATABASE statement. Database servers can
complex data type. A data type that is built from also have connections to one another. See also
a combination of other data types using an SQL explicit connection, implicit connection, and
type constructor and whose components can be multiplexed connection.
accessed through SQL statements. See also row
type and collection data type. connection coserver. The coserver to which a
client is directly connected. See also coserver and
component. In the High-Performance Loader participating coserver.
(HPL), the information required to load or
unload data is organized in several components. connection redirector. An Extended Parallel
The components are format, map, filter, query, Server feature, enabled by a setting in the
project, device array, load job, and unload job. sqlhosts file, whereby the database server
attempts to establish a client connection with
composite data type. See row type. each coserver in a dbserver group until a
connection succeeds.
composite index. An index constructed on two
or more columns of a table. The ordering constant. A value that cannot change during the
imposed by the composite index varies least execution of a program or command. In some
frequently on the first-named column and most programming languages, a constant has a name
frequently on the last-named column. that can be referenced. Compare with variable. See
also literal.
composite join. A join between two or more
tables based on the relationship among two or constraint. A restriction on what kinds of data
more columns in each table. See also simple join. can be inserted or updated in tables. See also
check constraint, primary-key constraint,
compressed bitmap. An indexing method that referential constraint, not-NULL constraint, and
identifies records through a fragment identifier unique constraint.
and a record identifier.
constructed data type. See complex data type.
concatenate. To append a second string to the
end of a first string. constructor. See type constructor.
concatenation operator. An operator whose control character. A character whose occurrence
notation is composed of two pipe symbols (||); in a particular context initiates, modifies, or stops
this is used in expressions to indicate the joining a control function (an operation to control a
of two strings. device, for example, in moving a visual cursor or
in reading data). In a program, you can define
concurrency. Access by two or more processes actions that use the CTRL key with another key
to the same database simultaneously. to execute some programming action (for
Glossary D-7
example, entering CTRL-W to obtain online Help cursor. In SQL, an identifier associated with a
in IBM Informix products). A control character is group of rows or with a collection data type.
sometimes referred to as a control key. Compare Conceptually, the pointer to the current row or
with printable character. collection element. You can use cursors for
SELECT statements or EXECUTE PROCEDURE
cooked files. See buffered disk I/O. statements (associating the cursor with the rows
returned by a query) or INSERT statements
coordinating server. In a query that spans (associating the cursor with a buffer to insert
multiple database servers, the server in which multiple rows as a group). A select cursor is
the query is initiated is called the coordinator or declared for sequential only (regular cursor) or
coordinating server. This server is also sometimes nonsequential (scroll cursor) retrieval of rows. In
called the local server because it is the local server addition, you can declare a select cursor for
to the client initiating the query. To respond to update (initiating locking control for updated
the query, the coordinating server starts sessions and deleted rows) or WITH HOLD (so that
on the other servers involved in the query. See completing the current transaction does not close
also distributed query, subordinate servers, and the cursor). In ESQL/C, a cursor can be dynamic,
remote servers. meaning that it can be referenced by an identifier
or by a character variable.
correlated subquery. A subquery (or inner
SELECT) that depends on a value produced by cursor function. A user-defined routine (UDR)
the outer SELECT statement that contains it. Also that returns one or more rows of data and
a nested subquery whose WHERE clause refers therefore requires a cursor to execute. An SPL
to an attribute of a relation that is declared in an routine is a cursor function when its RETURN
outer SELECT. Correlated subqueries reference statement contains the WITH RESUME
one or more columns from one or more tables of keywords. An external function is a cursor
a parent query and need to be evaluated once for function when it is defined as an iterator
each row in the parent query. See also function. Compare with noncursor function.
independent subquery and subquery.
cursor manipulation statements. The SQL
correlation name. The prefix used with a statements that control cursors; specifically, the
column name in a triggered action to refer to an CLOSE, DECLARE, FETCH, FLUSH, OPEN, and
old (before triggering statement) or a new (after PUT statements.
triggering statement) column value. The
associated column must be in the triggering Cursor Stability. An Informix level of isolation
table. See also trigger. available through the SET ISOLATION statement
in which the database server must secure a
corrupted database. A database whose tables or shared lock on a fetched row before the row can
indexes contain incomplete, inconsistent, or be viewed. The database server retains the lock
invalid data. until it receives a request to fetch a new row. See
also isolation.
corrupted index. An index that does not
correspond exactly to the data in its table. data access statements. The subset of SQL
statements that you can use to grant and revoke
coserver. The functional equivalent of a
permissions and to lock tables.
database server that operates on a single node.
See also connection coserver and participating data definition statements. The subset of SQL
coserver. statements (sometimes called data definition
language, or DDL) to create, alter, drop, and
current row. The most recently retrieved row of
rename data objects, including databases, tables,
the active set of a query.
views, synonyms, triggers, sequences, and
cross-server query. See distributed query. user-defined routines.
data distribution. A mapping of the data values database application. A program that applies
within a column into a set of categories that are database management techniques to implement
equivalent to a histogram or to a frequency specific data manipulation and reporting tasks.
distribution. You can use the UPDATE
STATISTICS statement (specifying the MEDIUM database environment. Used in the CONNECT
or HIGH keyword options) to create data statement, either the database server or the
distributions. database server-and-database to which a user
connects.
data integrity. The process of ensuring that data
corruption does not occur when multiple users database locale. The locale that defines the code
simultaneously try to alter the same data. set, collation, and date, time, number, and
Locking, constraints, and transaction logging are currency display conventions of a database
used to control data integrity. server. The DB_LOCALE environment variable
can specify this locale.
data integrity statements. SQL statements that
you use to control transactions and audits. Data database management system. See DBMS.
integrity statements also include statements for
database object. An SQL entity that is recorded
repairing and recovering tables.
in a system catalog table, such as a table,
data manipulation statements. The SQL column, constraint, access method, default value,
statements that can query tables, insert into cast, index, operator class, prepared statement,
tables, delete from tables, or update tables (select, privilege, role, sequence, synonym, trigger,
insert, delete, update). The load and unload user-defined aggregate, user-defined cast, user-defined
utilities also are sometimes called data data type, user-defined routine, or view.
manipulation statements.
database server. A software package that
data partitioning . See table fragmentation. manages access to one or more databases for one
or more client applications. See also relational
data replication. The ability to allow database database server.
objects to have more than one representation at
more than one distinct site. database server process. A virtual processor
that functions similarly to a CPU in a computer.
data restriction. Synonym for constraint. See also application process.
data type. A descriptor assigned to each column database server utility. A program that
in a table or program variable, which indicates performs a specific task. For example,
the type of data the column or program variable DB–Access, dbexport, and onmode are Informix
is intended to hold. Informix data types are database server utilities.
discussed in Chapter 2, “Data Types.” Informix
data types for Global Language Support are DataBlade API. An application programming
discussed in the IBM Informix: GLS User's Guide. interface (API) that allows a C user-defined routine
See also built-in data type, complex data type, access to the client application.
distinct data type, opaque data type, and
DataBlade module. A group of database objects
user-defined data type.
and supporting code that extends an
object-relational database to manage new kinds
Glossary D-9
of data or add new features. A DataBlade The database server monitors and prevents
module can include new data types, routines, potential deadlock situations by sending an error
casts, aggregates, access methods, SQL code, client message to the application if a request for a lock
code, and installation programs. might result in a deadlock.
DBA. Acronym for Database Administrator. The debug file. A file that receives output used for
DBA is responsible for the contents and use of a debugging purposes.
database, whereas the database server
administrator (DBSA) is responsible for decision-support application. An application
managing one or more database servers. Also a that provides information that is used for
level of privilege, typically for operations that strategic planning, decision-making, and
most users are not authorized to perform. reporting. It typically executes in a batch
environment in a sequential scan fashion and
DBA-privileged. A class of SPL routines that returns a large fraction of the rows scanned.
only a user with DBA database privileges creates. Decision-support queries typically scan the entire
database. See also online transaction processing
DBMS. Acronym for database management application.
system. These are all the components necessary to
create and maintain a database, including the decision-support query. A query that a
application development tools and the database decision-support application generates. It often
server. requires multiple joins, temporary tables, and
extensive calculations, and can benefit
dbserver group. A collection of coservers significantly from PDQ. See also online
defined and named by entries in the sqlhosts transaction processing queries.
file. Dbserver groups make multiple coservers
into a single logical entity for establishing or declaration statement. A programming
changing client/server connections. language statement that describes or defines
objects; for example, defining a program variable.
dbslice. A named set of dbspaces that can span Compare with procedure. See also data definition
multiple coservers. A dbslice is managed as a statements.
single storage object. See also logslice, physslice,
and rootslice. default. Values or behavior that take effect
unless the user explicitly specifies another value
dbspace. A logical collection of one or more or action.
chunks. Because chunks represent specific
regions of disk space, the creators of databases default locale. The locale that a product uses
and tables can control where their data is unless you specify a different (nondefault) locale.
physically located by placing databases or tables For IBM Informix products, U.S. English is the
in specific dbspaces. A dbspace provides a link default locale.
between logical (such as tables) and physical
units (such as chunks) of storage. See also root default value. A value that is used when no
dbspace. explicit value is specified. For example, you can
assign default values to columns with the ALTER
DDL. Acronym for data definition language, a TABLE and CREATE TABLE statements and to
subset of the Structured Query Language (SQL) variables in SPL routines.
for declaring, modifying, and dropping database
objects (such as tables, constraints, or indexes). delete. To remove any row or combination of
See also data definition statements. rows with the DELETE statement.
diagnostics table. A special table that holds distribution scheme. See table fragmentation.
information about the integrity violations caused
by each row in a violations table. You use the DLL. See dynamic link library (DLL).
START VIOLATIONS TABLE statement to create
DML. Acronym for data manipulation
violations tables and diagnostics tables and
language. See also data manipulation statements.
associate them with a base table.
dominant table. See outer join.
Dirty Read. An Informix isolation level set with
the SET ISOLATION statement that disregards DRDA. Acronym for Distributed Relational
locks and allows viewing of any existing rows, Database Architecture. DRDA is an IBM-defined
even rows that currently can be altered from set of protocols that software manufacturers can
inside an uncommitted transaction. Dirty Read is
Glossary D-11
follow to develop connectivity solutions between element type. The data type of the elements in a
heterogeneous relational database management collection.
environments.
embedded SQL. The SQL statements that are
DSS. Acronym for Decision Support System. See placed within some other host language. For
also decision-support application. example, Informix supports embedded SQL in C.
duplicate index. An index that allows duplicate enabled mode. The default object mode of
values in the indexed column. database objects. When a constraint, index, or
trigger is in this mode, the database server
dynamic link library (DLL). A shared-object file recognizes the existence of the object and takes
on a Windows system. See also shared library. the object into consideration while executing data
manipulation statements. See also object mode.
dynamic management statements. The SQL
statements that describe, execute, and prepare end-user format. The format in which data
other statements. appears within a client application as literal
strings or character variables. End-user formats
dynamic routine-name specification. The are useful for data types whose database format
execution of a user-defined routine whose name is is different from the format to which users are
determined at runtime through an SPL variable in accustomed.
the EXECUTE PROCEDURE, EXECUTE
ROUTINE, or EXECUTE FUNCTION statement. end-user routine. A user-defined routine (UDR)
that performs a task within an SQL statement
Dynamic Server instance. The set of processes, that the existing built-in routines do not perform.
storage spaces, and shared memory that together Examples of tasks include encapsulating multiple
comprise a complete database server. A single SQL statements, creating trigger actions, and
Dynamic Server instance can support more than restricting who can access database objects.
one database.
environment variable. A variable that the
dynamic SQL. The statements and structures operating system maintains for each user and
that allow a program to form an SQL statement makes available to all programs that the user
at runtime, so that portions of the statement can runs.
be determined by user input.
error log. A file that receives error information
dynamic statements. The SQL statements that whenever a program runs.
are specified at runtime (when the program is
executed), rather than when the program is error message. A message that is associated
compiled. You can use the PREPARE statement with a (usually negative) number. IBM Informix
to create dynamic SQL statements. applications display error messages on the screen
or write them to files.
EBCDIC. Acronym for Extended Binary Coded
Decimal Interchange Code, a 256-element 8-bit error trapping. See exception handling.
character set, originally designed for IBM
mainframe computers. escape character. A character that indicates that
the next character, normally interpreted by the
element. A member of a collection, such as a program as having special significance, is to be
LIST, MULTISET, or SET data type. An element processed as a literal character instead. The
can be a value of any built-in data type, opaque escape character precedes the special character
data type, distinct data type, named row type, (such as a wildcard or delimiter) to “escape”
unnamed row type, or collection data type. (that is, ignore) the special significance.
exception. An error or warning that the express mode. An Extended Parallel Server
database server returns, or a state that a SPL method of loading or unloading data that uses
statement initiates. light appends.
exception handling. The code in a program that expression. A specification that the database
anticipates and reacts to runtime errors and server can evaluate. This can include literal
warnings. Also referred to as error handling or values, constants, column values, functions,
error trapping. quoted strings, operators, and parentheses (as
delimiters). A Boolean expression evaluates as
exclusive access. Sole access to a database or TRUE, FALSE, or UNKNOWN. An arithmetic
table by a user. Other users are prevented from expression can contain the arithmetic operators
using it. (+, -, ¥, /, and so on) and returns a number.
execute. To run a statement, program, routine, or extent. A continuous segment of disk space that
a set of instructions. See also executable file. a database server allocated to a tblspace (a table).
The user can specify both the initial extent size
explicit cast. A user-defined cast that a user for a table and the size of all subsequent extents
explicitly invokes with the CAST AS keyword or that a database server allocates to the table.
cast operator ( :: ). See also implicit cast.
external function. An external routine that
explicit connection. A connection made to a returns a single value.
database environment that uses the CONNECT
statement. See also implicit connection. external procedure. An external routine that does
not return a value.
explicit projection list. In a SELECT statement,
a projection list that does not use the asterisk ( * external routine. A user-defined routine that is
) notation, but explicitly lists the names of the written in an external language that the database
Glossary D-13
supports. These external languages include the C file server. A network node that manages a set
and Java languages. The routine names, of disks and provides storage services to
parameters, and other information are registered computers on the network.
in the system catalog tables of a database.
However, the executable code of an external filename extension. The part of a filename
routine is stored outside the database. An following the period. For example, DB–Access
external routine can be an external function or an appends the extension .sql to command files.
external procedure.
filter. A set of conditions (sometimes called a
external space. Storage space that a predicate) for selecting rows or records. In an SQL
user-defined access method manages rather than query, the conditional expression in the WHERE
the database server. The IN clause of the clause is a filter that controls the active set of the
CREATE TABLE and CREATE INDEX statements query. The High-Performance Loader (HPL) uses
can specify the name of an external space instead a filter component to screen data before loading
of a dbspace. it into a database.
external table. A database table that is not in filtering mode. An object mode of a database
the current database. It might or might not be in object, causing bad rows to be written to the
a database that the same database server violations table during DML operations. During
manages. DML operations, the database server enforces
requirements of a constraint or of a unique index
extspace. (Not for Extended Parallel Server) A that is in this mode and identifies any rows that
logical name associated with an arbitrary string would violate the requirement.
that signifies the location of external data. Access
its contents with a user-defined access method. fixchar. A character data type in ESQL/C
programs, for fixed-length character strings that
family name. A quoted string constant that are padded (as needed) with trailing blanks, and
specifies a family name in the optical family. See not NULL-terminated.
also optical family.
fixed-point number. A number where the
fault tolerance. See high availability. decimal point is fixed at a specific place
regardless of the value of the number.
fetch. The action of moving a cursor to a new
row and retrieving the row values into memory. flag. A command-line option, usually indicated
by a minus ( - ) sign in UNIX systems. For
fetch buffer. A buffer in the application process example, in DB–Access the -e flag echoes input
that the database server uses to send fetched row to the screen.
data (except TEXT and BYTE data) to the
application. flexible temporary table. An explicit temporary
table that Extended Parallel Server automatically
field. A component of a named row type or fragments using a round-robin distribution
unnamed row type that contains a name and a data scheme.
type and can be accessed in an SQL statement by
using dot notation in the form row type name.field floating-point number. A number with fixed
name. See also column. precision (total number of digits) and undefined
scale (number of digits to the right of the
file. A collection of related information stored decimal point). The decimal point floats as
together on a system, such as the words in a appropriate to represent an assigned value.
letter or report, a computer program, or a listing
of data. foreign key. A column or set of columns that
references a unique or primary key in a table.
For every entry in a foreign-key column
Glossary D-15
header file. A source file that contains the home page does not change. The home page
declarations for variables, constants, and macros that contains a forward pointer to the new location of
a particular group of modules or programs share. the data row. See also remainder page.
help message. Online text displayed host variable. An SQL API program variable
automatically or at the request of the user to that you use in an embedded statement to
assist the user in interactive programs. Such transfer information between the SQL API
messages are stored in help files. program and the database.
hierarchy. A tree-like data structure in which identifier. In the default locale, a sequence of
some groups of data are subordinate to others letters, digits, and underscores (_) that is the
such that only one group (called root) exists at unqualified name of a database, storage, or
the highest level, and each group except root is program object. (Additional characters are valid
related to only one parent group on a higher in other locales or if the DELIMIDENT variable
level. is set.)
high availability. The ability of a system to implicit transaction. A transaction that begins
resist failure and data loss. High availability implicitly after the COMMIT WORK or
includes features such as fast recovery and ROLLBACK WORK statement. This is the only
mirroring. It is sometimes referred to as fault type of transaction that ANSI-compliant
tolerance. databases support, but it is also available for
other databases that support logging. See also
High-Performance Loader. The explicit transaction and singleton implicit
High-Performance Loader (HPL) utility is part of transaction.
Dynamic Server. The HPL loads and unloads
data using parallel access to devices. See also implicit cast. A built-in or user-defined cast that
external table. the database server automatically invokes to
perform data-type conversion. See also explicit
highlight. A rectangular inverse-video area cast.
marking your place on the screen. A highlight
can indicate the current option on a menu or the implicit connection. A connection that is made
current character in an editing session. If a using the DATABASE, CREATE DATABASE,
terminal cannot display highlighting, the current START DATABASE, or DROP DATABASE
option can appear in angle ( < > ) brackets, with statement. See also explicit connection.
the current character underlined.
implicit projection list. In a SELECT statement,
hold cursor. A cursor that is created using the using the asterisk ( * ) wildcard symbol so that a
WITH HOLD keywords. A hold cursor remains query returns values from all columns of the
open past the end of a transaction. It allows table. The projection list is sometimes called the
uninterrupted access to a set of rows across “select list,” because it immediately follows the
multiple transactions. SELECT keyword.
index. A structure of entries, each of which inmigration. The process by which Optical
contains a value or values and a pointer to the Subsystem migrates TEXT and BYTE data from
corresponding location in a table or smart large the optical storage subsystem into the Dynamic
object. An index might improve the performance Server environment.
of database queries by ordering a table according
to key column values or by providing access to inner join. A query that symmetrically
data inside of large objects. combines rows from two or more tables. See also
simple inner join.
index fragment. Consists of zero or more index
items grouped together, which can be stored in input. The information that is received from an
the same dbspace as the associated table external source (for example, from the keyboard,
fragment or in a separate dbspace. An index a file, or another program) and processed by a
fragment also might occupy an sbspace or an program.
extspace.
input parameter. In a prepared SQL statement,
Informix user ID. A login user ID (login user a value, represented by a “?” placeholder
name or authorization identifier) that must be valid symbol, that must be provided when the
on all computer systems (operating systems) prepared statement is executed.
involved in the client’s database access. Often
referred to as the client’s user ID. This need not insert cursor. A cursor for insert operations,
refer to a fully functional user account on the associated with an INSERT statement. Allows
computer system; only the user identity bulk insert data to be buffered in memory and
components of the user account information are written to disk.
significant to Informix database servers. A given
installation. The loading of software from some
user typically has the same Informix user ID on
medium (tape, cartridge, removable disk, or CD)
all networked computer systems involved in the
onto a computer, and preparing the software for
database access. The authorization identifier
use.
informix is required for some database objects
and operations. interactive. An aspect of a program that accepts
input from the user, processes the input, and
Informix user password. A user ID password
then produces output on the screen, in a file, or
that must be valid on all computer systems
on a printer.
(operating systems) involved in the client’s
database access. When the client specifies an internationalization. The process of making
explicit user ID, most computer systems require IBM Informix products easily adaptable to the
the Informix user password. conventions of various cultures and natural
languages. Among other features,
internationalized software can support
Glossary D-17
culturally-specific collation and date, time, and ISO8859-1. A code set that contains 256
money formats. See also IBM Informix Guide to single-byte characters. Characters 0 through 127
GLS Functionality. are the ASCII characters. Characters 128 through
255 are mostly non-English characters from
interquery parallelization. The ability to European languages; for example, é, ñ and ö.
process multiple queries simultaneously to avoid
a performance delay when multiple independent isolation. When multiple users attempt to
queries access the same table. See also intraquery access common data, the level of independence
parallelization. specifically relating to the locking strategy for
read-only SQL requests. The various levels of
interrupt. A signal from a user or another isolation are distinguished primarily by the
process that can stop the current process length of time that shared locks are (or can be)
temporarily or permanently. See also signal. acquired and held. You can set the isolation level
with the SET ISOLATION or SET
interrupt key. A key used to cancel or abort a TRANSACTION statement.
program or to leave a current menu and return
to the menu one level above. On many systems, iterator function. A cursor function that returns
the interrupt key is CONTROL-C; on some a data set by successive calls. It can be written in
others, the interrupt key is DEL or C or Java or can be an SPL routine that includes
CONTROL-Break. RETURN WITH RESUME.
intraquery parallelization. Breaking of a single jagged rows. A query result in which rows
query into subqueries by a database server using differ in the number and type of columns they
PDQ and then processing the subqueries in contain because the query applies to more than
parallel. Parallel processing of this type has one table in a table hierarchy.
important implications when each subquery
retrieves data from a fragment of a table. Because join. The process of combining information
each partial query operates on a smaller amount from two or more tables based on some common
of data, the retrieval time is significantly reduced domain of information. Rows from one table are
and performance is improved. See also interquery paired with rows from another table when
parallelization. information in the corresponding rows match on
the joining criterion. For example, if a
IPX/SPX. Acronym for Internetwork Packet customer_num column exists in the customer
Exchange/Sequenced Packet Exchange. It refers and the orders tables, you can construct a query
to the NetWare network protocol by Novell. that pairs each customer row with all the
associated orders rows based on the common
ISAM. Acronym for Indexed Sequential Access customer_num. See also Cartesian product and
Method. This allows you to find information in a outer join.
specific order or to find specific items of
information quickly through an index. See also join index. A type of generalized-key (GK)
access method. index that contains keys that are the result of a
query that joins multiple tables.
ISAM error. Operating system or file access
error. jukebox. A physical storage device that consists
of one or more optical-disc drives, slots for
ISO. Acronym for the International Standards platters, optical platters, and a robotic arm to
Organization. ISO sets worldwide standards for transfer platters between the slots and the drives.
the computer industry, including standards for A jukebox is also known as an autochanger.
character input and manipulation, code sets, and
SQL syntax. kernel. Operating system component that
controls processes and resource allocation.
Language Supplement. An IBM Informix load job. The information required to load data
product that provides the locale files and error into a relational database using the HPL. This
messages to support one or more languages. The information includes the format, map, filter,
International Language Supplement supports device array, project, and special options.
several European languages. IBM Informix
provides separate Language Supplements for local copy. For Extended Parallel Server, a
several Asian languages. replica of a table on a local coserver that is
copied to multiple coservers. This allows faster
large object. A data object that is logically access to the data for OLTP transactions
stored in a column of a table, but physically connected to those coservers because you do not
stored independently of the column, due to its have to send the data across the communication
size. Large objects can be simple large objects links between coservers.
(TEXT, BYTE) or smart large objects (BLOB,
CLOB). local loopback. A connection between the client
application and database server that uses a
leaf node. Index page containing index items network connection even though the client
and horizontal pointers to other leaf nodes. A application and the database server are on the
database server creates leaf nodes when the root same computer.
node becomes full.
local variable. A variable or identifier whose
level of isolation . See isolation. scope of reference is only within the routine in
which it is defined. Compare with global variable.
library. A group of precompiled routines
designed to perform tasks that are common to a locale. A set of Informix files that specify the
given kind of application. An application linguistic conventions for a country, region,
programming interface (API) can include a culture, or language. IBM Informix products
library of routines that you can call from provide predefined locales that customers cannot
application programs. See also dynamic link modify. A locale provides the name of the code
library (DLL), shared library, and shared-object set that the application data uses, the collation
file. order to use for character data, and the end-user
format. See also client locale, database locale,
light append. An unbuffered, unlogged insert default locale, server locale, and
operation. server-processing locale.
Glossary D-19
localized order. A collation order other than system failures, and restore databases from
code-set order, if defined for a locale. Only archives. See also physical log.
NCHAR and NVARCHAR data values are
collated in a localized order. Database objects login. The process of identifying oneself to a
collate in their creation-time order, if this is not computer.
the runtime order.
login password. See Informix user password.
locally-detached index. For Extended Parallel
Server, a type of index that has a fragmentation login user ID. See Informix user ID.
strategy that is independent of the table
logslice. A dbslice whose contents are
fragmentation but where the database server
comprised solely of logical-log files. The
recognizes that each index row resides on the
logical-log files in the logslice can be owned by
same co-server as the referenced data row. You
multiple coservers, one log file per dbspace. See
can use an expression, system-defined hash, or
also dbslice, rootslice, and physslice.
hybrid distribution scheme to create locally
detached indexes for any table. See also LVARCHAR. A built-in data type that stores
globally-detached index. varying-length character data of up to 32
kilobytes.
lock coupling. A locking feature that holds a
lock on the child node until a lock is obtained on macro. A named set of instructions that the
the parent node during upward movement when computer substitutes when it encounters the
updating an R-tree index. Lock coupling is used name in source code.
if the bounding box of a leaf node has changed.
You must propagate the change to the parent mantissa. The significant digits in a
node by moving upwards in the tree until you floating-point number.
reach a parent node that needs no change.
map. A description of the relation between the
lock mode. An option to specify whether a user records of a data file and the columns of a
who requests a lock on an already locked object relational database. See also component.
waits until the object is released to receive the
lock, or immediately receives an error, or waits massively parallel processing system. A system
for some span of time before receiving an error. composed of multiple computers that are
connected to a single high-speed communication
locking. A concurrency feature temporarily subsystem. MPP computers can be partitioned
limiting access to an object (database, table, page, into nodes. Compare with symmetric
or row) to prevent conflicting interactions among multiprocessing system.
concurrent processes. An exclusive lock restricts
read and write access to only one user; a shared megabyte. A unit of storage that equals 1024
lock allows read-only access to other users. An kilobytes or 10242 bytes.
update lock begins as a shared lock, but is
upgraded to an exclusive lock after a row is Memory Grant Manager (MGM). (Not for
changed. Extended Parallel Server) A database server
component that coordinates the use of memory
locking granularity. The size of a locked object. and I/O bandwidth for decision-support queries.
The size can be a database, table, page, or row. MGM uses the DS_MAX_QUERIES,
DS_TOTAL_MEMORY, DS_MAX_SCANS, and
logical log. An allocation of disk space that the PDQPRIORITY configuration parameters to
database server manages that contains records of determine what resources can or cannot be
all changes that were performed on a database granted to a decision-support query.
during the period when the log was active. It is
used to roll back transactions, recover from
Glossary D-21
NOT NULL constraint. A constraint on a opaque-type support function. One of a group
column that specifies that the column cannot of user-defined functions that the database server
contain NULL values. uses to perform operations on opaque data types
(such as converting between the internal and
NULL. A keyword of SQL, indicating that a external representations of the type).
value is unknown, missing, or not applicable. (A
NULL value is not the same as a value of zero or open. The process of making a resource
blank.) available, such as preparing a file for access,
activating a column, or initiating a window.
object. See database object.
operational table. A logging permanent table
object mode. The state of a database object as that uses light appends for fast update
recorded in the sysobjstate system catalog table. operations. Operational tables do not perform
A constraint or unique index can be in enabled, record-by-record logging.
disabled, or filtering mode. A trigger or duplicate
index can be in enabled or disabled mode. You operator. In an SQL statement, a keyword (such
use SET statements to change the mode of an as UNITS or UNION) or a symbol (such as =, >,
object. <,+, -, or *) that invokes an operator function. The
operands to the operator are arguments to the
object-relational database. A database that adds operator function.
object-oriented features to a relational database,
including support for user-defined data types, operator binding. The implicit invocation of an
user-defined routines, user-defined casts, operator function when an operator is used in an
user-defined access methods, and inheritance. SQL statement.
optical family. A group of optical discs, parallel database query. The execution of SQL
theoretically unlimited in number. queries in parallel rather than sequential order.
The tasks a query requires are distributed across
optical platter. A removable optical disc that several processors. This type of distribution
stores data in an optical storage subsystem. enhances database performance.
optical statements. The SQL statements that parallel-processing platform. A
you use to control optical clustering. parallel-processing platform is a set of
independent computers that operate in parallel
optical volume. One side of a removable and communicate over a high-speed network,
Write-Once-Read-Many (WORM) optical disc. bus, or interconnect. See also symmetric
multiprocessing system and massively parallel
outer join. An asymmetric joining of a
processing system.
dominant (outer) table and one or more
“subservient” tables in a query, where the values parallelism. Ability of an Informix database
for the outer table are preserved even if no server to process a task in parallel by breaking
matching rows exist in the subservient table. In the task into subtasks and processing the
the result set, any outer-table row that has no subtasks simultaneously, thus improving
matching row in the subservient table has NULL performance.
values in the columns selected from the
subservient table. parameter. A variable that is given a value for a
specified application. In the signature of a
outmigration. The process by which Optical user-defined routine, a parameter serves as a
Subsystem migrates TEXT or BYTE data from the placeholder for an argument. The parameter
Dynamic Server environment to an optical specifies the data type of the value that the
storage subsystem. user-defined routine expects when it receives the
associated argument at runtime. See also
output. The result that the computer produces
configuration file, input parameter, and routine
in response to a query or a request for a report.
signature.
overloading. See routine overloading.
parent-child relationship. See referential
owner-privileged. A class of SPL routines that constraint.
any user can create who has Resource database
parent table. The referenced table in a
privileges.
referential constraint. See also child table.
packed decimal. A storage format that
represents either two decimal digits or a sign
and one decimal digit in each byte.
Glossary D-23
participating coserver. A coserver that controls precision. The total number of significant digits
one or more fragments of a table that Extended in a real number, both to the right and left of the
Parallel Server accesses. See also coserver and decimal point. For example, the number
connection coserver. 1437.2305 has a precision of 8. See also scale.
partition. See table fragment. predefined opaque data type. An opaque data
type for which the database server provides the
pattern. An identifiable or repeatable series of data type definition. See also BLOB, BOOLEAN,
characters or symbols. CLOB, LVARCHAR, and pointer.
PDQ. Acronym for parallel database query. predicate. See filter.
PDQ priority. Determines the amount of predicate lock. A lock held on index keys that
resources that a database server allocates to qualifies for a predicate. In a predicate lock,
process a query in parallel. These resources exclusive predicates consist of a single key value,
include memory, threads (such as scan threads), and shared predicates consist of a query
and sort space. The level of parallelism is rectangle and a scan operation such as inclusion
established by using the PDQPRIORITY or overlap.
environment variable or various database server
configuration parameters (including prepared statement. An SQL statement that is
PDQPRIORITY and MAX_PDQPRIORITY) or generated by the PREPARE statement from a
dynamically through the SET PDQPRIORITY character string or from a variable that contains a
statement. character string. This feature allows you to form
your request while the program is executing
permission. On some operating systems, the without having to modify and recompile the
right to access files and directories. program.
phantom row. A row of a table that is initially preprocessor. A program that takes high-level
modified or inserted during a transaction but is programs and produces code that a standard
subsequently rolled back. Another user can see a language compiler such as C can compile.
phantom row if the isolation level is Informix
Dirty Read or ANSI compliant Read primary access method. An access method
Uncommitted. No other isolation level allows a whose routines access a table with such operations
user to see a changed but uncommitted row. as inserting, deleting, updating, and scanning.
See also secondary access method.
physical log. A set of contiguous disk pages in
shared memory where the database server stores primary key. The information from a column or
an unmodified copy (before-image) of pages set of columns that uniquely identifies each row
before the changed pages are recorded. The in a table. The primary key sometimes is called a
pages in the physical log can be any database unique key.
server page except a blobspace blobpage.
primary-key constraint. Specifies that each
physslice. A dbslice that contains the physical entry in a column or set of columns contains a
log. See also dbslice, logslice, and rootslice. unique non-NULL value.
pointer. A value that specifies the address in printable character. A character that can be
memory of the data or variable, rather than the displayed on a terminal, screen, or printer.
contents of the data or variable. Printable characters include A-Z, a-z, 0-9, and
punctuation marks. Compare with control
polymorphism. See routine overloading and character.
type substitutability.
Glossary D-25
Record-ID. A four-byte RSAM entity, also remote server. See subordinate server.
known as RID, that describes the logical position
of the record within a fragment. Not the same as remote table. In a distributed query, a table in a
rowid. database of a server that is not the local database
server. See also coordinating server, subordinate
recover a database. To restore a database to a server.
former condition after a system failure or other
destructive event. The recovery restores the Repeatable Read. An Informix and ANSI level
database as it existed immediately before the of isolation available with the Informix SET
failure. ISOLATION statement or the ANSI compliant
SET TRANSACTION statement, which ensures
referential constraint. The relationship between that all data values read during a transaction are
columns within a table or between tables; also not modified during the entire transaction.
known as a parent-child relationship. Referencing Transactions under ANSI Repeatable Read are
columns are also known as foreign keys. also known as Serializable. Informix Repeatable
Read is the default level of isolation for ANSI
registering. In a database, the process of storing compliant databases. See also isolation and
information about a database object in the system Serializable.
catalog tables of a database. Most SQL data
definition statements perform some type of reserved pages. The first 12 pages of the initial
registration. For example, the CREATE chunk of the root dbspace. Each reserved page
FUNCTION and CREATE PROCEDURE stores specific control and tracking information
statements register a user-defined routine in a that the database server uses.
database.
reserved word. A word in a statement or
relation. See table. command that you cannot use in any other
context of the language or program without
relational database. A database that uses table receiving a warning or error message.
structures to store data. Data in a relational
database is divided across tables in such a way restore a database. See recover a database.
that additions and modifications to the data can
be made easily without loss of information. role. A classification or work task, such as
payroll, that the DBA assigns. Assignment of
relational database server. A database server roles makes management of privileges
that manages data values that are stored in rows convenient.
and columns.
role separation. (Not for Extended Parallel
remainder page. A page that accommodates Server) A database server installation option that
subsequent bytes of a long data row. If the allows different users to perform different
trailing portion of a data row is less than a full administrative tasks.
page, it is stored on a remainder page. After the
database server creates a remainder page for a roll back. The process that reverses an action or
long row, it can use the remaining space in the series of actions on a database. The database is
page to store other rows. Each full page that returned to the condition that existed before the
follows the home page is referred to as a actions were executed. See also transaction and
big-remainder page. commit work.
remote connection. A connection that requires a root dbspace. The initial dbspace that the
network. database server creates. It contains reserved
pages and internal tables that describe and track
remote routine. A routine in a databases of a all other dbspaces, blobspaces, sbspaces,
remote server. See subordinate server. tblspaces, chunks, and databases.
Glossary D-27
sbspace. (Not for Extended Parallel Server) A audit event data for analysis. (For more details of
logical storage area that contains one or more secure auditing, see the IBM Informix: Trusted
chunks that store only BLOB and CLOB data. Facility Guide.)
scale. The number of digits to the right of the select. See query.
decimal place in DECIMAL notation. The
number 14.2350 has a scale of 4 (four digits to select cursor. A cursor that is associated with a
the right of the decimal point). See also precision. SELECT statement, which lets you scan multiple
rows of data, moving data row by row into a set
scale up. The ability to compensate for an of receiving variables.
increase in query size by adding a corresponding
amount of computer resources so that processing selection. A horizontal subset of the rows of a
time does not also increase. single table that satisfies a specified condition.
Selection is implemented through the WHERE
scan thread. A database server thread that is clause of a SELECT statement and returns some
assigned the task of reading rows from a table. of the rows and all of the columns in a table. See
When a query is executed in parallel, the also projection and join.
database server allocates multiple scan threads to
perform the query in parallel. selective index. A type of generalized-key index
that contains keys for only a subset of a table.
schema. The structure of a database or a table.
The schema for a table lists the names of the selectivity. The proportion of rows within the
columns, their data types, and (where applicable) table that a query filter can pass.
the lengths, indexing, and other information
about the structure of the table. self-join. A join between a table and itself. A
self-join occurs when a table is used two or more
scope of reference. The portion of a routine or times in a SELECT statement (with different
application program where an identifier can be aliases) and joined to itself.
accessed. Three possible scopes exist: local
(applies only in a single statement block), semaphore. An operating-system
modular (applies throughout a single module), communication device that signals a process to
and global (applies throughout the entire awaken.
program). See also local variable and global
sequence. A database object (sometimes called a
variable.
sequence generator) that can generate unique
scroll cursor. A cursor created with the SCROLL integer values in the INT8 range.
keyword that allows you to fetch rows of the
sequential cursor. A cursor that can fetch only
active set in any sequence.
the next row in sequence. A sequential cursor can
secondary access method. An access method read through a table only once each time the
whose routines access an index with such sequential cursor is opened.
operations as inserting, deleting, updating, and
Serializable. An ANSI-compliant level of
scanning. See also operator class and primary
isolation set with the SET TRANSACTION
access method.
statement, ensuring all data read during a
secure auditing. A facility of Informix database transaction is not modified during the entire
servers that lets a database system security transaction. See also isolation and Repeatable
officer (DSSO) monitor unusual or potentially Read.
harmful user activity. Use the onaudit utility to
server locale. The locale that a database server
enable auditing of events and to create audit
uses when it performs its own read and write
masks. Use the onshowaudit utility to extract
Glossary D-29
singleton implicit transaction. A name, parameters, executable format, and other
single-statement transaction that does not require information are stored in the system catalog
either a BEGIN WORK or a COMMIT WORK tables of a database. An SPL routine can be an
statement. This type of transaction can occur SPL procedure or an SPL function.
only in a database that is not ANSI compliant,
but that supports transaction logging. See also SPL variable. A variable that is declared with
explicit transaction and implicit transaction. the DEFINE statement in an SPL routine.
singleton select . A SELECT statement that SQL. Acronym for Structured Query Language.
returns a single row. SQL is a database query language that was
developed by IBM and standardized by ANSI.
smart large object. A large object that is stored Informix relational database management
in an sbspace, which has read, write, and seek products are based on an extended
properties similar to a UNIX file, is recoverable, implementation of ANSI-standard SQL.
obeys transaction isolation modes, and can be
retrieved in segments by an application. Smart SQL API. An application programming interface
large objects include BLOB and CLOB data types. that allows you to embed SQL statements
directly in an application. The
SMI. Acronym for system-monitoring interface. embedded-language product IBM Informix
ESQL/C is an example of an SQL API. See also
SMP. See symmetric multiprocessing system. host variable.
source file. A text file that contains instructions SQLCA. Acronym for SQL Communications Area.
in a high-level language, such as C. A C source The SQLCA is a data structure that stores
file is compiled into an executable file called an information about the most recently executed
object file. An SPL source file is compiled into its SQL statement. The result code returned by the
own executable format. See also compile. database server to the SQLCA is used for error
handling by Informix SQL APIs.
source type . The data type from which a
DISTINCT type is derived. sqlda. Acronym for SQL descriptor area. A
dynamic SQL management structure that can be
specific name. A name that you can assign to used with the DESCRIBE statement to store
an overloaded user-defined routine to uniquely information about database columns or host
identify a particular signature of the user-defined variables used in dynamic SQL statements. The
routine. See also routine overloading and routine sqlda structure is an Informix-specific structure
signature. for handling dynamic columns. It is available
only within an IBM Informix ESQL/C program.
speed up. The ability to add computing
See also descriptor and system-descriptor area.
hardware to achieve correspondingly faster
performance for a DSS query or OLTP operation sqlhosts. A file that identifies the types of
of a given volume. connections the database server supports.
SPL. See Stored Procedure Language (SPL). stack operator. Operators that allow programs
to manipulate values that are on the stack.
SPL function. An SPL routine that returns one
or more values. staging-area blobspace. (Not for Extended
Parallel Server) The blobspace where a database
SPL procedure. An SPL routine that does not
server temporarily stores TEXT or BYTE data
return a value.
that is being outmigrated to an optical storage
SPL routine. A user-defined routine that is subsystem.
written in Stored Procedure Language (SPL). Its
Glossary D-31
supertype. A named row type whose integers and uses a system-defined algorithm to
representation (data fields) and behavior (routines) distribute data evenly by hashing a specified key.
is inherited by a subtype below it in the type
hierarchy. system-descriptor area. A dynamic SQL
management structure that is used with the
support function. See aggregate support ALLOCATE DESCRIPTOR, DEALLOCATE
function, opaque-type support function, and DESCRIPTOR, DESCRIBE, GET DESCRIPTOR,
operator-class support function. and SET DESCRIPTOR statements to store
information about database columns or host
support routine. See support function. variables used in dynamic SQL statements. The
structure contains an item descriptor for each
symmetric multiprocessing system. A system column; each item descriptor provides
composed of multiple computers that are information such as the name, data type, length,
connected to a single high-speed communication scale, and precision of the column. The
subsystem. An SMP has fewer computers than an system-descriptor area is the X/Open standard
MPP system and cannot be partitioned into for handling dynamic columns. See also
nodes. Compare with massively parallel descriptor and sqlda.
processing system.
system index. An index that the database server
synonym. A name that is assigned to a table, creates to implement a unique constraint or a
view, or sequence and that can be used in place referential constraint. A system index is distinct
of the original name. A synonym does not from a user index, which a user creates explicitly.
replace the original name; instead, it acts as an
alias for the table, view, or sequence. system-monitoring interface. A collection of
tables and pseudo-tables in the sysmaster
sysmaster database. A database on each database that maintains dynamically updated
database server that holds the ON–Archive information about the operation of the database
catalog tables and system-monitoring interface server. The tables are constructed in memory but
(SMI) tables that contain information about the are not recorded on disk. Users can query the
state of the database server. The database server SMI tables with the SELECT statement of SQL.
creates the sysmaster database when it initializes
disk space. table. A rectangular array of data in which each
row describes a single entity and each column
system call. A routine in an operating-system contains the values for each category of
library that programs call to obtain information description. For example, a table can contain the
from the operating system. names and addresses of customers. Each row
corresponds to a different customer and the
system catalog. A group of database tables that
columns correspond to the name and address
contain information about the database itself,
items. A table is sometimes referred to as a base
such as the names of tables or columns in the
table to distinguish it from the views, indexes,
database, the number of rows in a table, the
and other objects defined on the underlying table
information about indexes and database
or associated with it.
privileges, and so on. See also data dictionary.
table fragment. Zero or more rows that are
system-defined cast. A pre-defined cast that is
grouped together and stored in a dbspace that
known to the database server. Each built-in cast
you specify when you create the fragment. A
performs automatic conversion between two
virtual table fragment might reside in an sbspace
different built-in data types.
or an extspace.
system-defined hash fragmentation. An
table fragmentation. A method of separating a
Extended Parallel Server-defined distribution
table into potentially balanced fragments to
scheme that maps each row in a table to a set of
Glossary D-33
two-phase commit. A protocol that ensures that of the operating system. This direct control helps
transactions are uniformly committed or rolled improve performance and reliability for updates
back across multiple database servers. It governs to data. Unbuffered I/O is supported by
the order in which commit transactions are character-special files on UNIX and by both
performed and provides a recovery mechanism unbuffered files and the raw disk interface on
in case a transaction does not execute. See also Windows.
heterogeneous commit.
Uncommitted Read. See Read Uncommitted.
type constructor. An SQL keyword that
indicates to the database server the type of uncorrelated subquery. See independent
complex data to create (for example, LIST, subquery.
MULTISET, ROW, SET).
unique constraint. Specifies that each entry in a
type hierarchy. A relationship that you define column or set of columns has a unique value.
among named row types in which subtypes inherit
representation (data fields) and behavior (routines) unique index. An index that prevents duplicate
from supertypes and can add more fields and values in the indexed column.
routines.
unique key. See primary key.
type inheritance. The property that allows a
UNIX real user ID. See Informix user ID.
named row type or typed table to inherit
representation (data fields, columns) and behavior unload job. The information required to unload
(routines, operators, rules) from a named row data from a relational database using the HPL.
type above it in the type hierarchy. This information includes format, map, query,
device array, project, and special options.
type substitutability. The ability to use an
instance of a subtype when an instance of its unlock. To free an object (database, table, page,
supertype is expected. or row) that has been locked. For example, a
locked table prevents others from adding,
typed collection variable. An ESQL/C collection
removing, updating, or (in the case of an
variable or SPL variable that has a defined
exclusive lock) viewing rows in that table as long
collection data type associated with it and can only
as it is locked. When the user or program
hold a collection of its defined type. See also
unlocks the table, others are permitted access
untyped collection variable.
again.
typed table. A table that is constructed from a
unnamed row type. A row type created with the
named row type and whose rows contain instances
ROW constructor that has no defined name and
of that row type. A typed table can be used as
no inheritance properties. Two unnamed row
part of a table hierarchy. The columns of a typed
types are equivalent if they have the same
table correspond to the fields of the named row
number of fields and if corresponding fields have
type.
the same data type, even if the fields have
UDA. See user-defined aggregate. different names.
update lock. A promotable lock that is acquired user index. An index that a user creates
during a SELECT...FOR UPDATE. An update explicitly with the CREATE INDEX statement.
lock behaves like a shared lock until the update Compare with system index.
actually occurs, and it then becomes an exclusive
lock. It differs from a shared lock in that only user name. See Informix user ID.
one update lock can be acquired on an object at a
user password. See Informix user password.
time.
user thread. User threads include session
user-defined aggregate. An aggregate function
threads (called sqlexec threads) that are the
that is not provided by the database server (built
primary threads that the database server runs to
in) that includes extensions to built-in aggregates
service client applications. User threads also
and newly defined aggregates. The database
include a thread to service requests from the
server manages all aggregates.
onmode utility, threads for recovery, and
user-defined base type. See opaque data type. page-cleaner threads. See thread.
user-defined cast. A cast that a user creates with variable. The identifier for a location in memory
the CREATE CAST statement. A user-defined that stores the value of a program object whose
cast typically requires a cast function. A value can change during program execution.
user-defined cast can be an explicit cast or an Compare with constant, macro, and pointer.
implicit cast.
variant function. A user-defined function that
user-defined data type. A data type that you might return different values when passed the
define for use in a relational database. You can same arguments. A variant function can contain
define opaque data types and distinct data types. SQL statements. Compare with nonvariant
function.
user-defined function. A user-defined routine that
returns at least one value. You can write a view. A dynamically controlled subset of the
user-defined function in SPL (SPL function) or in columns of one or more database tables. A view
an external language that the database server can give the programmer control over what
supports (external function). information the user sees and manipulates and
represents a virtual table that holds the results of
user-defined procedure. A user-defined routine a specified SELECT statement.
that does not return a value. You can write a
user-defined procedure in SPL (SPL procedure) or violations table. A special table that holds rows
in an external language that the database server that fail to satisfy constraints and unique index
supports (external procedure). requirements during data manipulation
operations on base tables. You use the START
user-defined routine. A routine that you write VIOLATIONS TABLE statement to create a
and register in the system catalog tables of a violations table and associate it with a base table.
database, and that an SQL statement or another
routine can invoke. You can write a user-defined virtual column. A derived column of
information, created with an SQL statement that
Glossary D-35
is not stored in the database. For example, you largest character that an operating system can
can create virtual columns in a SELECT support, and it must match the size of an integer
statement by arithmetically manipulating a single data type that the C compiler can scale. Some
column, such as multiplying existing values by a examples of an integer data type that the C
constant, or by combining multiple columns, compiler can scale are short integer (short int),
such as adding the values from two columns. integer (int), or long integer (long int).
VLDB. Acronym for very large database. X/Open Portability Guide (XPG). A set of
specifications that vendors and users can use to
warning. A message or other indicator about a build portable software. Any vendor that carries
condition that software (such as the database the XPG brand on a given software product is
server or compiler) detects. A condition that guaranteeing that the software correctly
results in a warning does not necessarily affect implements the X/Open Common Applications
the ability of the code to run. See also Environment (CAE) specifications. There are
compile-time error and runtime error. CAE specifications for SQL, XA, ISAM, RDA,
and so on.
white space. A series of one or more space
characters. The GLS locale defines the characters zoned decimal. (1) A data representation that
that are considered to be space characters. For uses the low-order four bits of each byte to
example, both the TAB and blank might be designate a decimal digit (0 through 9) and the
defined as space characters in one locale, but high-order four bits to designate the sign of the
certain combinations of the CTRL key and another digit. (2)
character might be defined as space characters in
a different locale.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give
you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
The following paragraph does not apply to the United Kingdom or any
other country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow
disclaimer of express or implied warranties in certain transactions, therefore,
this statement may not apply to you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those
Web sites. The materials at those Web sites are not part of the materials for
this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the
purpose of enabling: (i) the exchange of information between independently
created programs and other programs (including this one) and (ii) the mutual
use of the information which has been exchanged, should contact:
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003
U.S.A.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer
Agreement, IBM International Program License Agreement, or any equivalent
agreement between us.
All IBM prices shown are IBM’s suggested retail prices, are current and are
subject to change without notice. Dealer prices may vary.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include
the names of individuals, companies, brands, and products. All of these
names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
Each copy or any portion of these sample programs or any derivative work,
must include a copyright notice as follows:
© (your company name) (year). Portions of this code are derived from IBM
Corp. Sample Programs. © Copyright IBM Corp. (enter the year or years).
All rights reserved.
If you are viewing this information softcopy, the photographs and color
illustrations may not appear.
Notices E-3
Trademarks
AIX; DB2; DB2 Universal Database; Distributed Relational Database
Architecture; NUMA-Q; OS/2, OS/390, and OS/400; IBM Informix®;
C-ISAM®; Foundation.2000™; IBM Informix ® 4GL; IBM
Informix®DataBlade®Module; Client SDK™; Cloudscape™; Cloudsync™; IBM
Informix®Connect; IBM Informix®Driver for JDBC; Dynamic Connect™; IBM
Informix®Dynamic Scalable Architecture™(DSA); IBM Informix®Dynamic
Server™; IBM Informix®Enterprise Gateway Manager (Enterprise Gateway
Manager); IBM Informix®Extended Parallel Server™; i.Financial Services™;
J/Foundation™; MaxConnect™; Object Translator™; Red Brick™; IBM
Informix® SE; IBM Informix® SQL; InformiXML™; RedBack®; SystemBuilder™;
U2™; UniData®; UniVerse®; wintegrate®are trademarks or registered
trademarks of International Business Machines Corporation.
Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and other countries.
Other company, product, and service names used in this publication may be
trademarks or service marks of others.
Index X-3
Client/server (continued) Column (continued)
shared memory communication segments 3-60 range of values 1-25
stacksize for client session 3-62 referential constraints (sysreferences) 1-49
CLOB data type syscolumns data 1-22
casting not available 2-10 Column-level privileges
code-set conversion 2-11 systabauth data 1-7
collation 2-11 systabauth table 1-53
coltype code 1-23 Combine function 1-12
defined 2-10 Command-line conventions
inserting data 2-10 how to read xv
multibyte characters 2-10 sample diagram xv
syscolattribs data 1-19 Comment indicator 3-6
CLOSE statement 3-70 Comment lines 3-6
Clustering 1-13, 1-35, 1-38 Committed read 1-67
Code set Communications support module 3-56, 3-59
ASCII 1-32 Commutator function 1-46
collation order 2-37 Compiling
conversion 3-82 ESQL/C programs 3-20
East Asian 2-9, 2-37, 3-41 INFORMIXC setting 3-55
EBCDIC 1-32, 1-67 JAVA_COMPILER setting 3-66
ISO 8859-1 xi, 1-30 multithreaded ESQL/C applications 3-79
Code, sample, conventions for xvii Complex data type 2-46, 2-49
Collation collection types 2-47
CHAR data type 2-8, 2-9 ROW types 2-48
CLOB data type 2-11 sysattrtypes data 1-15
GL_COLLATE table 1-56 Compliance
NCHAR data type 2-26 ANSI/ISO standard for SQL 1-63, 3-21
server_attribute data 1-67 sql_languages.conformance 1-66
TEXT data type 2-35 with industry standards xxiv
VARCHAR data type 2-37 X/Open CAE standards 1-63
Collection data type XPG4 standard 1-65
casting matrix 2-56 Composite index 1-37
defined 2-47 Concatenation ( || ) operator 2-57
empty 2-48 concsm.cfg file 3-56
LIST 2-22 Configuration file
MULTISET 2-25 .cshrc file 3-7
SET 2-32 .informix 3-6, 3-9, 3-44, 3-49
sysattrtypes data 1-15 .login file 3-7
sysxtddesc data 1-61 .profile file 3-7
sysxtdtypes data 1-61 for communications support module 3-56, 3-59
Colon for connectivity 3-55, 3-60, 3-61
cast ( :: ) operator 2-53 for database servers 3-43, 3-68
DATETIME delimiter 2-13 for High-Performance Loader 3-74
INTERVAL delimiter 2-21 for MaxConnect 3-55
pathname separator 3-67 for ON-Bar utility 3-18
Color and intensity screen attributes 3-62 for onxfer utility 3-81
Column for terminal I/O 3-62, 3-79
changing data type 2-3, 2-50 Configuration parameter
constraints (sysconstraints) 1-26 COSERVER 3-69
default values (sysdefaults) 1-27 DBSPACETEMP 3-37
hashed 1-34 DEF_TABLE_LOCKMODE 3-49
in sales_demo database B-3, B-4 DIRECTIVES 3-49
in stores_demo database A-2, A-5 DISABLE_B162428_XA_FIX 3-54
in superstores_demo database B-6, B-16 END 3-69
inserting BLOB data 2-6 EXT_DIRECTIVES 1-28, 3-50
Index X-5
customer table in sales_demo database B-3 Data types (continued)
customer table in stores_demo database A-2 casting 2-50, 2-56
customer table in superstores_demo database B-8, B-9 classified by category 2-2
collection 2-47
D complex 2-46
Data compression 3-64 conversion 2-50
Data corruption 1-9, 1-19 distinct 2-17, 2-49
Data dependencies exact numeric 1-65
syscheckudrdep data 1-19 extended 2-46
syscoldepend data 1-20 fixed point 2-16
sysdepend data 1-27 floating-point 2-15, 2-19, 2-34
sysnewdepend data 1-40 inheritance 2-28
Data dictionary 1-2 internal 2-5
Data distributions 1-10, 1-28, 3-41 named ROW 2-27
Data encryption 3-65 opaque 2-26, 2-49
Data integrity 1-66 sequential integer 2-31
Data pages 1-19, 1-37, 1-54 simple large object 2-39
Data type smart large object 2-39
BLOB 2-6 summary list 2-3
BOOLEAN 2-7 unique numeric value 2-31
BYTE 2-7 unnamed ROW 2-28
CHAR 2-8 Data warehousing B-1
CHARACTER 2-6, 2-9 Database
CHARACTER VARYING 2-9 data types 2-2
CLOB 2-10 dimensional B-2
DATE 2-11 identifiers 3-42
DATETIME 2-11 joins in stores_demo A-7
DEC 2-15 object-relational B-1
DECIMAL 2-15 objects, sysobjectstate data 1-41
DISTINCT 2-17 privileges 1-59
DOUBLE PRECISION 2-18 sales_demo B-1
FLOAT 2-18 stores_demo A-1
INT 2-19 superstores_demo B-3, B-5
INT8 2-19 syscrd 1-3
INTEGER 2-19 sysmaster 1-3
INTERVAL 2-19 sysutils 1-3
LIST 2-22 sysuuid 1-3
LVARCHAR 2-23 Database identifiers 3-43
MONEY 2-24 Database server
MULTISET 2-25 attributes in Information Schema view 1-66
NCHAR 2-26 codeset 1-67
NUMERIC 2-26 coserver name 3-60
NVARCHAR 2-26 default connection 3-60
OPAQUE 2-26 default isolation level 1-67
REAL 2-27 optimizing queries 3-71
ROW 2-27, 2-29 pathname for 3-33
SERIAL 2-30 remote 3-20, 3-44
SERIAL8 2-31 role separation 3-63
SET 2-32 server name 1-27, 3-34
SMALLFLOAT 2-33 Database Server Administrator (DBSA) 3-63
SMALLINT 2-34 DATABASE statement 3-33
TEXT 2-34 Database system administrator (DBSA) 1-3
VARCHAR 2-36 DataBlade module
Data types Client and Server API 2-40
approximate 1-65 data types (sysbuiltintypes) 1-3
Index X-7
Default (continued) Distinct data type (continued)
detached indexes 3-42 defined 2-17
detail level 3-65 sysxtddesc data 1-61
disk space for sorting 3-42 sysxtdtypes data 1-61, 1-62, 2-18
fetch buffer size 3-44 Distributed Computing Environment (DCE) 3-80
heap size 3-66 Distributed query 2-46, 3-20, 3-44
isolation level 1-67 Documentation conventions xii
join method 3-69 Documentation Notes xix
level of parallelism 3-73 Documentation set of all manuals xxi
lock mode 3-48 Documentation, types of xviii
message directory 3-30 machine notes xix
MONEY scale 2-25 online manuals xxi
operator class 1-13, 1-42 printed manuals xxi
printing program 3-35 Dollar sign 2-24, 3-31
query optimizer goal 3-71 Dotted decimal format of syntax diagrams C-1
sysdefaults.default 1-27 Double data type of C 2-18
table privileges 3-68 DOUBLE PRECISION data type.
temporary dbspace 3-38 See FLOAT data type.
termcap file 3-79 Double-precision floating-point number 2-18
text editor 3-28 DROP CAST statement B-17
Default locale xi DROP DATABASE statement 3-33
DEFAULT_ATTACH environment variable 3-42 DROP FUNCTION statement 1-47
DEFINE statement of SPL 2-30, 2-31 DROP INDEX statement 1-55
Delete privilege 1-33, 1-53, 3-68 DROP OPTICAL CLUSTER statement 1-43
DELETE statement 1-9, 1-60 DROP PROCEDURE statement 1-47
Delete trigger 1-58 DROP ROUTINE statement 1-47
DELIMIDENT environment variable 3-42 DROP ROW TYPE statement 2-28
DELIMITED files 1-31, 1-32 DROP SEQUENCE statement 3-80
Delimited identifiers 3-42, 3-43 DROP TABLE statement 3-80
Delimiter DROP TYPE statement 2-18, 2-27
for DATETIME values 2-13 DROP VIEW statement 1-63, 3-80
for fields 1-32, 3-28
for identifiers 3-42 E
for INTERVAL values 2-21 EBCDIC collation 1-32, 1-67
Demonstration database Editor, DBEDIT setting 3-28
tables A-2, A-5, B-5 EMACS text editor 3-29
Dependencies, software x Empty set 2-48
Descending index 1-37 en_us.8859-1 locale xi
DESCRIBE statement 3-53 ENCRYPT_DES function 2-10
Describe-for-updates 3-53 ENCRYPT_TDES function 2-10
destroy() support function 2-47 Encryption 3-65
Detached index 3-42 END configuration parameter 3-69
Deutsche mark (DM) currency symbol 3-31 Enterprise Replication 1-3
Diagnostics table 1-60 env utility 3-8
Dimension tables, in push-down hash joins 3-48 ENVIGNORE environment variable
DIRECTIVES configuration parameter 3-49 defined 3-6, 3-43
Directives for query optimization 3-49, 3-69, 3-71 relation to chkenv utility 3-9
Disabilities, visual Environment configuration file
reading syntax diagrams C-1 debugging with chkenv 3-9
Disabled object 1-60 setting environment variables in UNIX 3-4, 3-6
Disk space Environment registry key 3-10
for data distributions 3-41 Environment variable
for temporary data 3-37 AC_CONFIG 3-18
Distinct data type AFDEBUG 3-18
casts 2-54 ANSIOWNER 3-18
Index X-9
Environment variables (continued) Extension checking (DBANSIWARN) 3-22
how to set in Korn shell 3-7 Extent, changing size 1-9
listed alphabetically 3-14 External database 1-52
listed by topic 3-81 External database server 1-52
manipulating in Windows environments 3-10 External directives for query optimization 3-50
modifying settings 3-8 External routine 1-46
overriding a setting 3-6, 3-43 External table
rules of precedence in UNIX 3-9 sysextcols data 1-31
rules of precedence in Windows 3-13 sysextdfiles data 1-31
scope of reference 3-11 sysexternal data 1-32
setting syssyntable data 1-52
at the command line 3-4 systables data 1-54
for native Windows applications 3-10 External view 1-52
in a configuration file 3-4 extspace 1-13
in a login file 3-4
in a shell file 3-7 F
in Windows environments 3-5 Fact table
with command-line utilities 3-11 dimensional example B-3
with the Registry Editor 3-10 in push-down hash joins 3-47
with the System applet 3-11 FALSE setting
setting in autoexec.bat 3-12 BOOLEAN value 2-7
standard UNIX system 3-4 CPFIRST 3-20
types of 3-3 ISM_COMPRESSION 3-64
unsetting 3-7, 3-12, 3-43 Farsi locales 2-8
view current setting 3-8 FET_BUF_SIZE environment variable 3-19, 3-44
where to set 3-7 Fetch buffer 3-44
Equality ( = ) operator 2-10 Fetch buffer size 3-19, 3-44
Era-based dates 3-41 FETCH statement 3-70
Error message files 3-29 Field delimiter
Error messages xx DBDELIMITER 3-28
esql command 3-20, 3-55 Field of a ROW data type 2-48
ESQL/C Field qualifier
DATETIME routines 3-39 DATETIME values 2-12
esqlc command 3-20 EXTEND function 2-43
long identifiers 3-52 INTERVAL values 2-20
message chaining 3-70 Fields of a ROW data type 2-48
multithreaded applications 3-79 File
program compilation order 3-20 environment configuration files 3-9
Exact numeric data types 1-65 installation directory 3-58
Executable programs 3-71 permission settings 3-6
Execute privilege 1-44, 3-68 shell 3-6
Explicit cast 1-17, 2-53 temporary 3-36, 3-38, 3-75
Explicit pathnames 3-12, 3-35 temporary for SE 3-38
Explicit temporary tables 3-37 termcap, terminfo 3-62, 3-78, 3-79
Exponent 2-17 File extensions
Exponential notation 2-15 .a 3-52
export utility 3-7 .cfg 3-56
export_binary() support function 2-47 .cmd 3-13
export() support function 2-47 .ec 3-20
Expression-based fragmentation 1-34, 3-24, 3-27 .ecp 3-20
EXT_DIRECTIVES configuration parameter 1-28, 3-50 .iem 3-30
EXTEND function 2-43 .jar 3-66
Extended data types 1-61, 2-46, B-17 .rc 3-6, 3-10, 3-43, 3-49
Extended Parallel Server (XPS) 1-10, 3-14, B-1 .so 3-52
Extensible Markup Language (XML) 2-10 .sql 1-63, 3-33, 3-34, 3-43, B-1, B-5
Index X-11
Hyphen Index (continued)
DATETIME delimiter 2-13 functional 1-37, 2-48
INTERVAL delimiter 2-21 generalized-key 1-36, 1-40, 1-49
globally detached 1-35, 3-45
I nonfragmented 3-42
I/O overhead 3-77 of data types 2-3
IBM Informix Dynamic Server (IDS) 1-10 of environment variables 3-81
IBM Informix ESQL/C 3-20, 3-27, 3-39, 3-52, 3-70 of system catalog 1-10
IBM Informix Extended Parallel Server (XPS) 1-10, R-tree 3-42
3-14 sysindexes data 1-36
IBM Informix Storage Manager (ISM) 3-64, 3-66 sysindices data 1-38
IBM_XPS_PARAMS environment variable 3-45 sysobjstate data 1-41
IDS (Informix Dynamic Server) 1-10 threads for sorting 3-76
IFMX_CART_ALRM environment variable 3-46 unique 1-26, 1-36, 2-30, 2-31
IFMX_OPT_FACT_TABS environment variable 3-47 Index privilege 1-53
IFMX_OPT_NON_DIM_TABS environment Indexkey structure 1-38
variable 3-48 Indirect typing 2-30, 2-31
IFX_DEF_TABLE_LOCKMODE environment Industry standards
variable 3-48 See Compliance.
IFX_DIRECTIVES environment variable 3-49 Industry standards, compliance with xxiv, 1-66
IFX_EXTDIRECTIVES environment variable 1-28, 3-50 INF_ROLE_SEP environment variable 3-63
IFX_LONGID environment variable 3-51 Information Schema views
IFX_NETBUF_PVTPOOL_SIZE environment accessing 1-64
variable 3-52 columns 1-64
IFX_NETBUF_SIZE environment variable 3-52 defined 1-63
IFX_NO_TIMELIMIT_WARNING environment generating 1-63
variable 3-52 server_info 1-66
IFX_PAD_VARCHAR environment variable 3-53 sql_languages 1-66
IFX_UPDDESC environment variable 3-53 tables 1-64
IFX_XASTDCOMPLIANCE_XAEND environment Informational messages 1-30
variable 3-53 Informix Dynamic Server documentation set xxi
imcadmin administrative tool 3-54 Informix extension checking (DBANSIWARN) 3-21
IMCADMIN environment variable 3-54 informix owner name 1-9, 1-17, 1-29, 1-36, 1-38, 1-54,
IMCCONFIG environment variable 3-55 3-30, 3-63
IMCSERVER environment variable 3-55 Informix subkey 3-10
IMPEX data type 2-54 informix.rc file 3-6, 3-10, 3-49
IMPEXBIN data type 2-54 INFORMIXC environment variable 3-55
Implicit cast 1-17, 2-53 INFORMIXCONCSMCFG environment variable 3-56
Implicit connection 3-60 INFORMIXCONRETRY environment variable 3-56
Implicit temporary tables 3-37 INFORMIXCONTIME environment variable 3-57
import_binary() support function 2-47 INFORMIXCPPMAP environment variable 3-58
import() support function 2-47 INFORMIXDIR environment variable 3-58
IN clause 3-37 INFORMIXDIR/bin directory xi
IN keyword 1-34, 2-7, 2-25, 2-30, 2-33, 2-35, 2-57 INFORMIXKEYTAB environment variable 3-59
IN TABLE storage option 3-42 INFORMIXOPCACHE environment variable 3-59
Index INFORMIXSERVER environment variable 3-60
attached 1-36, 3-25, 3-42, 3-76 INFORMIXSHMBASE environment variable 3-60
B-tree 1-37, 3-42 INFORMIXSTACKSIZE environment variable 3-62
clustered 1-36, 1-38 INFORMIXTERM environment variable 3-62
composite 1-36, 1-37 Inheritance hierarchy 1-39, 2-29
default values for attached 3-76 Initialization function 1-12, 1-50
descending 1-37 Input support function 2-23
detached 3-42 input() support function 2-47
distribution scheme 3-42 Insert privilege 1-33, 1-53, 3-68
fragmented 1-33 INSERT statement 1-56, 1-60, 2-14, 2-48, 3-21, 3-27
Index X-13
Locale (continued) mkdir utility 3-30
multibyte 2-9 MODERATE INTEG keywords
of trace messages 1-57 ALTER TABLE statement 2-40
right-to-left 2-8 CREATE TABLE statement 2-40
specifying 3-82, 3-86 Modifiers
Lock-table overflow 3-49 CLASS 1-46
LOCKMODE keyword 3-48 COSTFUNC 1-47
LOCOPY function 2-6, 2-10 HANDLESNULLS 1-46
LOG keyword INTERNAL 1-46
ALTER TABLE statement 2-40 NEGATOR 1-46
CREATE TABLE statement 2-40 NOT VARIANT 1-46
Logging mode 1-19 PARALLELIZABLE 1-47
Long identifiers SELCONST 1-46
client version 3-51 STACK 1-47
IFX_LONGID setting 3-51 VARIANT 1-46
Information Schema views 1-64 MODIFY NEXT SIZE keywords 1-9
LOTOFILE function 2-6, 2-10 MONEY data type
LOW keyword built-in casts 2-52
PDQPRIORITY 3-73 defined 2-24
UPDATE STATISTICS 1-29 display format 3-30
Lowercase mode codes 1-47 international money formats 2-25
Lowercase privilege codes 1-7, 1-20, 1-33, 1-53, 1-61 length (syscolumns) 1-25
LVARCHAR data type MONTH keyword
casting opaque types 2-54 DATETIME qualifier 2-12
coltype code 1-23 INTERVAL qualifier 2-20
defined 2-23 Multibyte characters
CLOB data type 2-10
M VARCHAR data type 2-37
Machine notes xix, 3-63 MULTISET data type
Magnetic storage media 1-17 constructor 2-48
Mantissa precision 1-65, 2-16 defined 2-25
manufact table in superstores_demo database B-12
Map file for C++ programs 3-58 N
MATCHES operator 2-7, 2-35, 2-38, 2-57, 3-68 N setting
MaxConnect 3-54, 3-55 sysroleauth.is_grantable 1-50
MEDIUM keyword 1-10, 1-25, 1-29 Named ROW data type
Membership operator 2-57 See also ROW type.
Memory cache, for staging blobspace 3-59 casting permitted 2-56
Message file defined 2-27
specifying subdirectory with DBLANG 3-30 defining 2-27
XBSA 3-64 equivalence 2-28
Messages inheritance 1-39, 2-28
chaining 3-70 typed tables 2-28
error in syserrors 1-30 NCHAR data type
optimized transfers 3-70 collation order 2-26
reducing requests 3-71 conversion to CHAR 3-32
trace message template 1-57 defined 2-26
warning in syserrors 1-30 multibyte characters 2-26
mi_collection_card() function 2-23, 2-25, 2-33 Negator function 1-46
mi_db_error_raise() function 1-30 Nested dot notation 2-48
Microsoft C compiler 3-55 Nested-loop join 3-69
MINUTE keyword Network buffers 3-52
DATETIME qualifier 2-12 Network environment variable, DBPATH 3-33
INTERVAL qualifier 2-20 NFS directory 3-38
MITRACE_OFF configuration parameter 1-56, 1-57
Index X-15
Parallel distributed queries, setting with Primary access method 1-13, 1-52
PDQPRIORITY 3-72 Primary key 1-26, 1-49, 1-60, 2-30, 2-31, A-2, B-6
Parallel sorting, setting with PSORT_NPROCS 3-75 Primary thread 3-62
Partial characters 2-8 Printed manuals xxi
PATH environment variable 3-71, 3-72 printenv utility 3-8
Pathname Printing with DBPRINT 3-35
for C compiler 3-55 Private environment-configuration file 3-9, 3-44
for C++ map file 3-58 Private network buffer pool 3-52
for client or shared libraries 3-67 Private synonym 1-54
for concsm.cfg file 3-56 Privilege
for connectivity information 3-61 default table privileges 3-68
for database server 3-33 on columns (syscolauth table) 1-20
for dynamic-link libraries 3-68, 3-77 on procedures and functions (sysprocauth
for environment-configuration file 3-9 table) 1-44
for executable programs 3-71 on table fragments (sysfragauth table) 1-33
for installation 3-58 on tables (systabauth table) 1-53
for keytab file 3-59 on the database (sysusers table) 1-59
for message files 3-29 on UDTs and named row types
for parallel sorting 3-75 (sysxtdtypeauth) 1-61
for remote shell 3-36 product table in sales_demo database B-3
for smart-large-object handles 3-74 Protected routines 1-47
for temporary .jar files 3-66 Pseudo-machine code (p-code) 1-44
for termcap file 3-78 PSORT_DBTEMP environment variable 3-75
for terminfo directory 3-79 PSORT_NPROCS environment variable 3-76
for XBSA messages 3-64 Public synonym 1-51, 1-54
for xfer_config file 3-81 public user name 1-64
separator symbols 3-72 Purpose functions 1-13
PDQ Push-down hash join
OPTCOMPIND environment variable 3-69 dimension tables 3-48
PDQPRIORITY environment variable 3-72 fact tables 3-47
PDQPRIORITY configuration parameter 3-73 putenv utility 3-5
Percentage ( % ) symbol 3-39
Period Q
DATE delimiter 3-26 Qualifier field
DATETIME delimiter 2-13 DATETIME 2-12
INTERVAL delimiter 2-21 EXTEND 2-45
Permissions 3-6, 3-30 INTERVAL 2-20
PLCONFIG environment variable 3-74 UNITS 2-44
plconfig file 3-74 Query optimizer
PLOAD_LO_PATH environment variable 3-74 defined 1-9
PLOAD_SHMBASE environment variable 3-74 directives 3-49, 3-50
PostScript 2-10 push-down hash-join plans 3-47, 3-48
Precedence rules sysprocplan data 1-48
for casts 2-54 Quoted string
for lock mode 3-49 DATE and DATETIME literals 2-44
for native Windows application 3-14 DELIMIDENT setting 3-43
for SQL operators 2-56 INTERVAL literals 2-21
for UNIX environment variables 3-9 invalid with BYTE 2-8
for Windows environment variables 3-13 invalid with TEXT 2-35
Precision LVARCHAR data type 2-23
of currency values 2-24
of numbers 1-65, 2-15, 2-18, 2-19, 2-34 R
of time values 2-11, 2-20, 2-42, 2-45 R-tree index 3-42, 3-77
PREPARE statement 1-55 Raw UNIX devices 3-37
Prepared statement 1-55 Read committed 1-67
Index X-17
Sequential integers Shell (continued)
aggid code 1-12 specifying with DBREMOTECMD 3-36
am_id code 1-13 SHLIB_PATH environment variable 3-77
classid code 1-56 Simple large objects
constrid code 1-26 defined 2-39
extended_id code 1-62 location (sysblobs) 1-16
id code 1-28, 1-30 Single-precision floating-point number 2-27, 2-34
langid code 1-50 SMALLFLOAT data type
msgid code 1-57 built-in casts 2-52
opclassid code 1-42 defined 2-34
planid code 1-48 display format 3-29, 3-30
procid code 1-45, 1-46 SMALLINT data type
seqid code 1-51 built-in casts 2-52
SERIAL data type 2-30 defined 2-34
SERIAL8 data type 2-31 length (syscolumns) 1-24
tabid code 1-5, 1-51, 1-54 Smart large objects
trigid code 1-58 See also sbspacee.
udr_id code 1-18 defined 2-39
SERIAL data type syscolattribs data 1-19
defined 2-30 Smart-large-object handles 3-74
inserting values 2-31 Software dependencies x
length (syscolumns) 1-24 SOFTWARE registry key 3-10
resetting values 2-31 SOME operator 2-57
SERIAL8 data type Sort-merge join 3-69
assigning a starting value 2-31 Sorting
defined 2-31 See also Collation.
inserting values 2-32 DBSPACETEMP environment variable 3-36
length (syscolumns) 1-24 PSORT_DBTEMP environment variable 3-75
resetting values 2-32 PSORT_NPROCS environment variable 3-76
using with INT8 2-32 Space
Serializable transactions 1-67 DATETIME delimiter 2-13
SET ALL_MUTABLES statement 3-74 INTERVAL delimiter 2-21
SET data type, defined 2-32 Spatial queries 3-77
SET ENVIRONMENT statement 3-4, 3-5, 3-70, 3-74 SPL routine 1-45, 2-48, 3-24, 3-27
SET OPTIMIZATION statement 3-71 SPL variables 2-48
SET PDQPRIORITY statement 3-73 SQL (Structured Query Language) 3-22
SET SESSION AUTHORIZATION statement 1-47 SQL character set 3-43
SET STMT_CACHE statement 3-78 SQL code xvii
SET TEMP TABLE_SPACE statement 3-37 SQL Communication Area (SQLCA) 3-22
set utility 3-12 sqlhosts file 3-54, 3-60, 3-61
setenv utility 3-8 SQLHOSTS subkey 3-61
Setnet32 utility 3-5 SQLSTATE value 1-30
Setting environment variables sqlwarn array 3-22
in UNIX 3-6 Stack size 1-47, 3-62
in Windows 3-10 STACKSIZE configuration parameter 3-62
SGML (Standard Graphic Markup Language) 2-10 Staging area blobspace 3-59
Shared environment-configuration file 3-9 Standard Graphic Markup Language (SGML) 2-10
Shared libraries 3-52 START DATABASE statement 3-33
Shared memory STAT data type 1-29
INFORMIXSHMBASE 3-60 state table in stores_demo database A-5
PLOAD_SHMBASE 3-74 state table in superstores_demo database B-14
Shell Statement cache 3-77
remote 3-36 Statements of SQL
search path 3-71 ALTER OPTICAL CLUSTER 1-43
setting environment variables in a file 3-6 ALTER SEQUENCE 3-80
Index X-19
superstores_demo database (continued) sysindexes system catalog table 1-36
defined B-5 sysindices system catalog table 1-38
items table columns B-10 sysinherits system catalog table 1-39
manufact table columns B-12 syslangauth system catalog table 1-39
orders table columns B-11, B-12, B-13 syslogmap system catalog table 1-40
primary-foreign key relationships B-19, B-21 sysmaster database 1-3
sales_rep table columns B-13 initialization 3-4, 3-60
stock table columns B-14 versus system catalog tables 1-3
stock_discount table columns B-15 sysnewdepend system catalog table 1-40
structure of tables B-5 sysobjstate system catalog table 1-41
Supertable 1-39, B-11, B-18 sysopclasses system catalog table 1-41
Supertype 1-39, 2-28 sysopclstr system catalog table 1-42
Support function sysprocauth system catalog table 1-44
DISTINCT data types 2-49 sysprocbody system catalog table 1-44
OPAQUE data types 2-27, 2-47 sysprocedures system catalog table 1-45
routine identifier 1-45 sysprocplan system catalog table 1-48
Symbol table 1-45, 1-46 sysreferences system catalog table 1-49
Synonym sysrepository system catalog table 1-49
syssynonyms data 1-51 sysroleauth system catalog table 1-50
syssyntable data 1-51 sysroutinelangs system catalog table 1-50
systables data 1-54 syssequences system catalog table 1-51
USETABLENAME setting 3-80 syssynonyms system catalog table 1-51
Syntax diagrams syssyntable system catalog table 1-51
conventions for xiii systabamdata system catalog table 1-52
keywords in xvi systabauth system catalog table 1-53
reading in a screen reader C-1 systables system catalog table 1-54
variables in xvi System administrator (DBA) 1-3
Syntax segment xv System applet 3-11
sysaggregates system catalog table 1-12 System catalog
sysams system catalog table 1-12 sysaggregates 1-12
sysattrtypes system catalog table 1-15 sysams 1-12
sysblobs system catalog table 1-16 sysattrtypes 1-15
sysbuiltintypes table 1-3 sysblobs 1-16
syscasts system catalog table 1-17, 2-50 syscasts 1-17
syschecks system catalog table 1-18 syschecks 1-18
syscheckudrdep system catalog table 1-18 syscheckudrdep 1-18
syscolattribs system catalog table 1-19 syscolattribs 1-19
syscolauth system catalog table 1-20 syscolauth 1-20
syscoldepend system catalog table 1-20 syscoldepend 1-20
syscolumns system catalog table 1-22 syscolumns 1-22
sysconstraints system catalog table 1-26 sysconstraints 1-26
syscrd database 1-3 sysdefaults 1-27
sysdbclose() routine 3-5 sysdepend 1-27
sysdbopen() routine 3-5 sysdirectives 1-28
sysdefaults system catalog table 1-27 sysdistrib 1-28
sysdepend system catalog table 1-27 sysdomains 1-30
sysdirectives system catalog table 1-28 syserrors 1-30
sysdistrib system catalog table 1-28 sysextcols 1-31
sysdomains system catalog table 1-30 sysextdfiles 1-31
syserrors system catalog table 1-30 sysexternal 1-32
sysextcols system catalog table 1-31 sysfragauth 1-33
sysextdfiles system catalog table 1-31 sysfragments 1-33
sysexternal system catalog table 1-32 sysindexes 1-36
sysfragauth system catalog table 1-33 sysindices 1-38
sysfragments system catalog table 1-33 sysinherits 1-39
Index X-21
Table (continued) thread flag of ESQL/C 3-80
structure in superstores_demo database B-5 THREADLIB environment variable 3-79
synonyms in syssyntable 1-51 Time data types
system catalog tables 1-12, 1-61 arithmetic 2-41
temporary 3-37, 3-38 length (syscolumns) 1-24
temporary in SE 3-38 listed 2-38
typed, and named ROW type 2-28 time table in sales_demo database B-4
untyped, and unnamed ROW 2-30 Time values
Table-based fragmentation 1-34 DBCENTURY setting 3-22
Table-level privilege DBDATE setting 3-25
PUBLIC 1-64 DBTIME setting 3-39
sysfragauth data 1-33 GL_DATETIME settings 3-41
systabauth data 1-7, 1-53 USEOSTIME parameter 2-15
Tape management Time zone, specifying 3-45, 3-46
setting DBREMOTECMD 3-36 Time-limited licenses
Temporary dbspace 3-36 (IFX_NO_TIMELIMIT_WARNING) 3-52
Temporary files 3-38 TO keyword
in SE, specifying directory with DBTEMP 3-38 DATETIME qualifier 2-12
setting DBSPACETEMP 3-36 EXTEND function 2-43
setting PSORT_DBTEMP 3-75 INTERVAL qualifier 2-20
Temporary tables 3-36 TOBIGINT environment variable 3-80
in SE, specifying directory with DBTEMP 3-38 TOC Notes xix
specifying dbspace with DBSPACETEMP 3-36 TODAY operator 1-27, 3-45
TERM environment variable 3-78 Trace class 1-56
TERMCAP environment variable 3-78 Trace statements 1-57
termcap file Trailing blank spaces 3-67
setting INFORMIXTERM 3-62 Transaction isolation level 1-67, 3-69
setting TERMCAP 3-78 Transaction logging 1-19, 1-67, B-1
Terminal handling Trigger
setting INFORMIXTERM 3-62 creation-time value 3-24, 3-27
setting TERM 3-78 sysobjstate data 1-41
setting TERMCAP 3-78 systrigbody data 1-57
setting TERMINFO 3-79 systriggers data 1-58
terminfo directory 3-63, 3-79 TRUE setting
TERMINFO environment variable 3-79 BOOLEAN values 2-7
TEXT data type CPFIRST 3-20
casting to CLOB 2-35 ISM_COMPRESSION 3-64
collation 2-35 ISM_ENCRYPTION 3-65
defined 2-34 sysams table 1-13, 1-14
increasing buffer size 3-22 Truncation 2-8
inserting values 2-35 TYPE keyword 2-29
length (syscolumns) 1-25 Typographical conventions xii
nonprintable characters 2-35
queries 2-35 U
restrictions UDA
in Boolean expression 2-35 See User-defined aggregates.
with GROUP BY 2-35 UDR
with LIKE or MATCHES 2-35 See User-defined routine.
with ORDER BY 2-35 UDT
setting buffer size 3-22 See User-defined data type.
sysblobs data 1-16 UDT indexes 3-77
sysfragments data 1-34 Unary arithmetic operators 2-57
with control characters 2-35 Uncommitted read 1-67
Text editor 3-28 Under privilege 1-53
Thousands separator 2-24 Unique constraint 2-30, 2-31
Index X-23
Utility (continued)
source 3-6
X
X setting
unset 3-7
sysams.am_sptype 1-13
unsetenv 3-7, 3-43
systabauth.tabauth 1-53
vi 3-29
X/Open
V compliance 1-66
Information Schema views 1-63
VARCHAR data type
See also CHARACTER VARYING data type. server_info view 1-66
collation 2-37 XBSA
conversion to NVARCHAR 3-32, 3-33 debugging records 3-65
defined 2-36 message log file 3-65
shared library 3-65
length (syscolumns) 1-24
XFER_CONFIG environment variable 3-81
multibyte characters 2-37
nonprintable characters 2-37 xfer_config file 3-81
storing numeric values 2-37 XML (Extensible Markup Language) 2-10
Variable-length packets 3-53 XOR setting 3-65
XPG4 standard 1-65
Variable-length UDT 1-62
XPS (Extended Parallel Server) 1-10, 3-14, B-1
Variables, in syntax diagrams xvi
VARIANT routine 1-46
vi text editor 3-29
Y
Y setting
View
DBDATE 3-26
columns view 1-64
DBTIME 3-40
Information Schema 1-63
sysroleauth.is_grantable 1-50
server_info view 1-66
Year 2000 3-23
sql_languages view 1-66
YEAR keyword
sysdepend data 1-27
DATETIME qualifier 2-12
sysindexes view 1-38
EXTEND function 2-43
syssynonyms data 1-51
INTERVAL qualifier 2-20
syssyntable data 1-51
Year values, two and four digit 2-14, 3-22, 3-26, 3-40
systabauth data 1-53
yes setting
systables data 1-54
NODEFDAC 3-68
sysviews data 1-59
YES setting
tables view 1-64
columns.is_nullable 1-65
Violations
sql_languages.integrity 1-66
sysobjstate data 1-41
sysviolations data 1-60
Virtual machine 3-18, 3-66
Z
Zero (0)
Virtual processor 3-77
C null as terminator 2-37
Visual disabilities DBDATE separator 3-26
reading syntax diagrams C-1 DECIMAL scale 2-15
hexadecimal digit 3-28
W IFX_DIRECTIVES setting 3-49, 3-50
Warning message 1-30, 3-22
IFX_LONGID setting 3-51
WHERE keyword 1-9, 1-18, 2-35
IFX_NETBUF_PVTPOOL_SIZE setting 3-52
Whitespace characters 3-67
INFORMIXOPCACHE setting 3-59
Whitespace in identifiers 3-43
integer scale 1-65, 2-15
Window borders 3-62
ISM_DEBUG_LEVEL setting 3-65
Windows environments
OPTCOMPIND setting 3-69
manipulating environment variables 3-10
OPTMSG setting 3-70
setting environment variables 3-5
OPTOFC setting 3-71
Windows NT
padding of 1-digit years 3-23
default locale for xi
padding with DBFLTMASK 3-29
Windows registry 3-10
padding with DBTIME 3-40
PDQPRIORITY setting 3-72
Index X-25
X-26 IBM Informix Guide to SQL: Reference
Printed in USA
G251-2283-00
Spine information:
IBM DB2 IBM Informix Version 10.0/8.5 IBM Informix Guide to SQL: Reference