ArcGIS Server Banner

Keyset tables in a geodatabase in PostgreSQL

Keyset tables in a geodatabase in PostgreSQL

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
A keyset table is used to store a list of selected rows when an ArcGIS Desktop client executes a geodatabase relationship query that joins tables using attributes that are type integer, number, date, or string.

As discussed in Log file configuration options, log file tables store the ObjectIDs of the selected features. Keyset tables are used to accommodate joins using attributes other than the ObjectID.

One keyset table is created per connection per session when there are more than 99 rows in the source selection set in the database query.

Keyset tables in ArcCatalog and ArcMap

You do not see keyset tables in ArcCatalog or ArcMap. However, you cause a keyset table to be created and populated when you select more than 99 records in a feature class involved in a relationship class in ArcMap, then open the attribute table and use the Related Tables list in the Options menu to retrieve the related table. You also cause a keyset table to be created if you start an edit session.

Keyset tables in a PostgreSQL DBMS

No keyset tables are present in the geodatabase until one of two things happens:

When either of these two things happens, the keyset table is created. In the first case, the keyset table is created and populated. In the second example, the keyset table is merely created but not populated until a qualifying selection set is made.

The keyset table name includes the process identification number of the session that caused the keyset table to be created. The format is as follows:

keyset_<process_id>

The keyset table stores a keyset ID number for each selection set and values for the field on which the relationship between the feature classes is based.

Because it is a temporary table, the keyset table is deleted when the user disconnects from the database. However, you may notice the temporary schemas created by PostgreSQL to store this table remain. These have names such as pg_temp_3.

The following is a keyset table for a selection made between the related tables laterals and contractors. In this case, the long_val field is populated and contains the values of the contractor_id field on which the relationship class between laterals and contractors is based.

Keyset table and associated business tables in PostgreSQL

keyset_<process_id>

The following is the definition for a keyset table in PostgreSQL:


Field name Field type Description
keyset_id integer Identifier for the keyset selection

NOT NULL
long_val integer Value of the field on which the relationship class is based, if that field is a number field
str_val varchar(256) Value of the field on which the relationship class is based, if that field is a string field
dbl_val double precision Value of the field on which the relationship class is based, if that field is a double-precision field
date_val time stamp without time zone Value of the field on which the relationship class is based, if that field is a date field

Keyset tables in an XML workspace document

Because keyset tables are temporary tables, they are not exported to an XML workspace document.

See Also

  • Relationships between datasets in a geodatabase in PostgreSQL