Chapter 14 DBMS-Specific Features


PostgreSQL extended attributes

The following extended attributes are defined by default in the PostgreSQL DBMS.

Database

The following extended attributes are available on the PostgreSQL tab:

Name Internal Code Description
Template Template The name of the template from which to create the new database, or DEFAULT to use the default template.
Encoding Encoding Character set encoding to use in the new database. Specify a string constant (e.g., 'SQL_ASCII'), or an integer encoding number, or DEFAULT to use the default encoding.

Domain (Base Type)

The following extended attributes are available on the Base Type tab:

Name Internal Code Description
Array delimiter ExtTypeDelimiter Delimiter character for the array.
Array Element type ExtTypeElement Specifies the type of the array elements.
Input function ExtTypeInput Name of a function, created by CREATE FUNCTION, which converts data from its external form to the internal form of the type.
Length ExtTypeLength Literal value which specifies the internal length of the new type.
Output function ExtTypeOutput Name of a function, created by CREATE FUNCTION, which converts data from its internal form to a form suitable for display.
By Value ExtTypePassedByValue Indicates that operators and functions which use this data type should be passed an argument by value rather than by reference.
Receive function ExtTypeReceive Name of a function, created by CREATE FUNCTION, which converts data of this type from a form suitable for transmission from another machine to internal form.
Send function ExtTypeSend Name of a function, created by CREATE FUNCTION, which converts data of this type into a form suitable for transmission to another machine.

Domain (Composite Type)

The following extended attributes are available on the Composite Type tab:

Name Internal Code Description
Definition CompositeDefinition The composite type is specified by a list of attribute names and data types. This is essentially the same as the row type of a table, but using CREATE TYPE avoids the need to create an actual table when all that is wanted is to define a type. A stand-alone composite type is useful as the argument or return type of a function.

Groups

The following extended attributes are available on the PostgreSQL tab:

Name Internal Code Description
Group identifier (id) SysId The SYSID clause can be used to choose the PostgreSQL group ID of the new group. This is normally not necessary, but may be useful if you need to recreate a group referenced in the permissions of some object.

Procedures

The following extended attributes are available on the Language tab:

Name Internal Code Description
Language ProcLanguage The name of the language that the function is implemented in. May be SQL, C, internal, or the name of a user-defined procedural language. (See also extended attribute type ProcLanguageList.)

References

The following extended attributes are available on the PostgreSQL tab:

Name Internal Code Description
Deferrable Deferrable This controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable may be postponed until the end of the transaction.

Only foreign key constraints currently accept this clause. All other constraint types are not deferrable.
Foreign key constraint ForeignKeyConstraintDeferred If a constraint is deferrable, this clause specifies the default time to check the constraint.

False means the constraint is INITIALLY IMMEDIATE, it is checked after each statement. This is the default.

True means the constraint is INITIALLY DEFERRED, it is checked only at the end of the transaction.

Tables

The following extended attributes are available on the PostgreSQL tab:

Name Internal Code Description
Temporary state Temporary If specified, the table is created as a temporary table. Temporary tables are automatically dropped at the end of a session, or optionally at the end of the current transaction.

Tablespaces

The following extended attributes are available on the PostgreSQL tab:

Name Internal Code Description
Location TbspLocation The directory that will be used for the tablespace. The directory must be specified by an absolute path name.
Owner TbspOwner The name of the user who will own the tablespace. If omitted, defaults to the user executing the command. Only superusers may create tablespaces, but they can assign ownership of tablespaces to non-superusers.

Users

The following extended attributes are available on the PostgreSQL tab:

Name Internal Code Description
Create database CreateDB Defines a user's ability to create databases.

If TRUE, the user is allowed to create databases.
Create user CreateUser If TRUE, the user is allowed to create new users.

This option also turns the user into a superuser who can override all access restrictions.
Encrypted password EncryptedPassword Control whether the password is stored encrypted in the system catalogs.
User identifier (id) SysId The SYSID clause can be used to choose the PostgreSQL user ID of the new user. This is normally not necessary, but may be useful if you need to recreate the owner of an orphaned object.
Validity Validity This clause sets an absolute time after which the user's password is no longer valid. If this clause is omitted the password will be valid for all time.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.