f2s_default_index_tablespace¶
Applies to: Oracle, PostgreSQL Drivers
Syntax
set_attribute f2s_default_index_tablespace of {DriverId} to {variable}
get_attribute f2s_default_index_tablespace of {DriverId} to {variable}
Parameter |
Description |
---|---|
DriverID |
The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID. |
variable |
String varible for the tablespace name. |
Description
A tablespace is a container of segments, objects that have an allotted amount of space, i.e. tables and indexes. This attribute is used to get or set the default name of the tablespace to be used by DataFlex when creating an index. To set or get the default tablespace name for the data tables, use the f2s_default_tablespace attribute. Set this attribute ONLY to an exising tablespace.
Getting or setting the attribute can be done at any time.
Even though MYSQL uses tablespaces, this this attribute is only supported in Oracle and PostgreSQL.
Examples
get_attribute
string st0
Get_Attribute f2s_default_index_tablespace of _f2s_ActiveDriverID to st0
set_attribute
In this example, a new index is added to the customer table using the same tablespace as the customer table.
Integer iIndex
String st1
Handle hCustomer
Get_Attribute f2s_table_tablespace of Customer.File_Number to st1
Showln (SFormat("The tablespace for Customer is %1",st1))
Set_Attribute f2s_default_index_tablespace of _f2s_ActiveDriverID to st1
Move Customer.File_Number to hCustomer
Structure_Start hCustomer _f2s_ActiveDriver
Move 0 to iIndex
Create_Index hCustomer At iIndex
Set_Attribute DF_INDEX_NUMBER_SEGMENTS of hCustomer iIndex to 2
Set_Attribute DF_INDEX_SEGMENT_FIELD of hCustomer iIndex 1 to 10
Set_Attribute DF_INDEX_SEGMENT_FIELD of hCustomer iIndex 2 to 1
Set_Attribute DF_INDEX_SEGMENT_DIRECTION of hCustomer iIndex 1 to DF_DESCENDING
Structure_End hCustomer
Open Customer
Get_Attribute f2s_index_tablespace of Customer.File_Number 4 to st1
Showln (SFormat("The tablespace of index 4 is %1",st1))
Related Attributes
reference
reference 2
ESQL Equivalents
Replaces: Commands GET_DEFAULT_INDEX_TABLESPACE and SET_DEFAULT_INDEX_TABLESPACE