Update docs to mention need to update PK sequences when importing data to a table

Open Beginner friendly
#183 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
62/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
sql
Domain
documentation

Research direction

Open the user guide's "Importing and Exporting data in Postico" section and review how table imports are documented. Add the primary-key sequence caveat and the provided ALTER SEQUENCE example, then verify that the section clearly explains when the sequence must be advanced after copying data.

Written by the indexing model from the issue text.

Description

When copying data from a source table to a target table, you may have to modify the table's primary key sequence so that the next insert doesn't violate the primary key constraint, as sequence state isn't carried over with the copy.

For example, if the highest primary key of the pasted data was 42, and the sequence was called "My_pk_seq", with a query such as:

ALTER SEQUENCE "My_pk_seq" RESTART WITH 43;

Just thought it might be a good idea to add this caveat to the "Importing and Exporting data in Postico" section of the user guide. Thanks for this great tool!

Dominant language
Python
Stars
485
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jakob/Postico

All issues in jakob/Postico

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.