Skip to content

Follow-up: Set PG UUID PKs for non-duplicate features on UPDATE mode#43

Merged
gacarrillor merged 6 commits into
masterfrom
followup_pg_uuid_on_update_mode
Apr 16, 2026
Merged

Follow-up: Set PG UUID PKs for non-duplicate features on UPDATE mode#43
gacarrillor merged 6 commits into
masterfrom
followup_pg_uuid_on_update_mode

Conversation

@gacarrillor

@gacarrillor gacarrillor commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Complex subject :), let's summarize how do we handle PKs:

PRIMARY KEY APPEND mode UPDATE mode
Automatic PK
(e.g., serial)
It lets the provider (e.g., PostgreSQL, GeoPackage, etc.) fill the value automatically Duplicate features: It doesn't modify the value already stored
Non-duplicate features: Let's the provider fill the value automatically, except for UUID PKs on PostgreSQL, where the value is set from the source layer (if given)!
Non-automatic PK You need to provide a value for the PK in the source layer, because such value wil be set in the target layer's PK Duplicate features: It doesn't modify the value already stored
Non-duplicate features: The value is set from the source layer (it should always be given)!

New tests and test enhancements included.

Ref #42

… target layer's PK on update mode (i.e., duplicate features' PKs remain untouched, but non-duplicate features are appended bringing their PK from the source, despite the target layer's PK being automatic)
…non-duplicated (i.e., appended) target features
…he PK for non-duplicated (i.e., appended) target features
…o be set for non-duplicate features from the source layer (without updating the existing PK value for duplicate features)!
…h existing UUIDs, BUT we do set the PK from source for non-duplicate features being appended on UPDATE mode
@gacarrillor gacarrillor merged commit 3be4af8 into master Apr 16, 2026
2 checks passed
@gacarrillor gacarrillor deleted the followup_pg_uuid_on_update_mode branch April 16, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant