Skip to main content
added 135 characters in body
Source Link
swiss_knight
  • 10.9k
  • 9
  • 50
  • 132

In FME 2023+, when using Truncate Existing in the Table Handling drop-down list in a PostgreSQL/PostGIS writer, is it possible to reset the numbering sequence associated to the primary key when this is an IDENTITY field? E.g. a checkbox that I missed?

I'm asking because after a large amount of trials, some labels in QGIS with IDs in their definition become incredibly large because the sequence is not reset to 0.

enter image description here

Currently, I don't see any option for that and as a workaround I have to manually execute such query in the "SQL To Run Before Write" option of the writer. It's totally fine, but imho one can do better in terms of maintainability and to lower the number of user inputs.

I cannot drop the actual database table.
I have to let PostgreSQL manage the id field - which is not a serial but an identity.

In FME 2023+, when using Truncate Existing in the Table Handling drop-down list in a PostgreSQL/PostGIS writer, is it possible to reset the numbering sequence associated to the primary key when this is an IDENTITY field? E.g. a checkbox that I missed?

I'm asking because after a large amount of trials, some labels in QGIS with IDs in their definition become incredibly large because the sequence is not reset to 0.

enter image description here

Currently, I don't see any option for that and as a workaround I have to manually execute such query in the "SQL To Run Before Write" option of the writer. It's totally fine, but imho one can do better in terms of maintainability and to lower the number of user inputs.

In FME 2023+, when using Truncate Existing in the Table Handling drop-down list in a PostgreSQL/PostGIS writer, is it possible to reset the numbering sequence associated to the primary key when this is an IDENTITY field? E.g. a checkbox that I missed?

I'm asking because after a large amount of trials, some labels in QGIS with IDs in their definition become incredibly large because the sequence is not reset to 0.

enter image description here

Currently, I don't see any option for that and as a workaround I have to manually execute such query in the "SQL To Run Before Write" option of the writer. It's totally fine, but imho one can do better in terms of maintainability and to lower the number of user inputs.

I cannot drop the actual database table.
I have to let PostgreSQL manage the id field - which is not a serial but an identity.

Source Link
swiss_knight
  • 10.9k
  • 9
  • 50
  • 132

FME restart identity sequence when using Truncate Existing in the writer table handling drop-down menu

In FME 2023+, when using Truncate Existing in the Table Handling drop-down list in a PostgreSQL/PostGIS writer, is it possible to reset the numbering sequence associated to the primary key when this is an IDENTITY field? E.g. a checkbox that I missed?

I'm asking because after a large amount of trials, some labels in QGIS with IDs in their definition become incredibly large because the sequence is not reset to 0.

enter image description here

Currently, I don't see any option for that and as a workaround I have to manually execute such query in the "SQL To Run Before Write" option of the writer. It's totally fine, but imho one can do better in terms of maintainability and to lower the number of user inputs.