Relational Engine Limits
The following table shows the limits or conditions that apply to features of the Relational Engine. A PSQL database may contain four billion objects in any valid combination. The objects are persisted in the data dictionary files.
See also
Naming Conventions
in
PSQL Programmer's Guide
in the Developer Reference.
Table 19
Limits/Conditions of PSQL Features
PSQL Feature
Limit or Condition
Metadata
V1
V2
Arguments in a parameter list for a stored procedure
300
CHAR column size
8,000 bytes
1
Character string literal
See
String Values
.
Columns in a table
1,536
Columns allowed in a trigger or stored procedure
300
Column name
2
20 bytes
128 bytes
Column size
2 GB
Correlation name
Limited by memory
Cursor name
18 bytes
Database name
2
20 bytes
Database sessions
Limited by memory
Data file path name
64 bytes (the maximum length of the data file path name is a combination of Xf$Loc path and the data file path)
250 bytes (the maximum length of the data file path name is a combination of Xf$Loc path and the data file path)
Function (user-defined) name
2
30 bytes
128 bytes
Group name
2
30 bytes
128 bytes
Index name
2
20 bytes
128 bytes
Key name
2
20 bytes
128 bytes
Label name
limited by memory
NCHAR column size
4,000 UCS-2 units (8,000 bytes
1
)
NVARCHAR column size
4,000 UCS-2 units (8,000 bytes
1
)
Number of ANDed predicates
300
Number of database objects
65,536
2 billion
Parameter name
126 bytes
Password
2
8 bytes
128 bytes
Procedure name
2
30 bytes
128 bytes
Referential integrity (RI) constraint name
20 bytes
128 bytes
Representation of single quote
Two consecutive single quotes ('')
Result name
Limited by memory
Savepoint name
Limited by memory
SELECT list columns in a query
1,600
Size of a single term (quoted literal string) in an SQL statement
14,997, excluding null terminator and quotations (15,000 total)
SQL statement length
64 KB
SQL statements per session
Limited by memory
Stored procedure size
64 KB
Table name
2
20 bytes
128 bytes
Table rows
2 billion
Joined tables per query
Limited by memory
Trigger name
2
20 bytes
128 bytes
User name
2
30 bytes
128 bytes
VARCHAR column size
8,000 bytes
1
Variable name
Limited by memory
View name
2
20 bytes
128 bytes
1
The maximum size of a CHAR, NCHAR, VARCHAR or NVARCHAR column that may be fully indexed is 255 bytes
2
See also
Identifier Restrictions by Identifier Type
in
Advanced Operations Guide
.
Fully Qualified Object Names
A fully qualified object name uses dot notation to combine database and object names. For example, if the database mydbase has a view myview, then its fully qualified object name is mydbase.myview.
Fully qualified object names must be unique within a database. For example, if database mydbase has table acctpay and user-defined function acctpay, then PSQL cannot resolve the name mydbase.acctpay.
Delimited Identifiers in SQL Statements
Use delimited identifiers for column and table names if they contain nonstandard characters. If an identifier is a keyword, it must delimited. The delimiter character is the double quotation mark.
Examples
SELECT "last-name" FROM "non-standard-tbl"
The hyphen is a nonstandard character.
SELECT "password" FROM my_pword_tbl
“Password” is a keyword in the SET PASSWORD statement.