...
Code Block |
---|
CREATE TABLE gt_pk_metadata ( table_schema VARCHAR(32), table_name VARCHAR(32) NOT NULL, pk_column VARCHAR(32) NOT NULL, pk_column_idx INTEGER, pk_policy VARCHAR(32), pk_sequence VARCHAR(64), unique (table_schema, table_name, pk_column), check (pk_policy in ('sequence', 'assigned', 'autoincrement')) ) |
pk_policy can be 'assigned', 'sequence' or 'autogenerated' depending upon how the key column value is generated. The pk_sequence value only need to be set if the policy is 'sequence'.
'sequence' means that the value for the column is generated using a database sequence, and the 'pk_sequence' value must be set.
'autogenerated' means that the value for the column is generated by the database using another method.
'assigned' means that the value for the column is determined by the current maximum value +1, if the column is an integral type, or as a random string if the column is textual.
Column | Description |
---|---|
table_schema | Name of the database schema in which the table is located. |
table_name | Name of the table to be published |
pk_column | Name of a column used to form the feature IDs |
pk_column_idx | Index of the column in a multi-column key. In case multi column keys are needed multiple records with the same table schema and table name will be used. |
pk_policy | The new value generation policy, used in case a new feature needs to be added in the table ('assigned', 'sequence' or 'autogenerated'). |
pk_sequence | The name of the database sequence to be used when generating a new value for the pk_column. |
Examples
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<spatial:spatialengine id="postgis"> <dbtype>postgis</dbtype> <host>mysqlhost</host> <port>5432</port> <database>spatial</database> <user>gis</user> <passwd>hak0rz</passwd> </spatial:spatialengine> |