Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy collection does not create new sequence for primary key #51

Open
thomasstorm opened this issue Jan 23, 2023 · 0 comments
Open

Copy collection does not create new sequence for primary key #51

thomasstorm opened this issue Jan 23, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@thomasstorm
Copy link
Contributor

thomasstorm commented Jan 23, 2023

If a collection is copied using the geoDB (client), there is no new sequence created for the primary key within the new collection. That is not necessarily a problem, albeit a bit crooked. But when a user shall be granted access to such a copied collection, geoDB looks for the sequence with the name of the new collection, doesn't find it and throw an error.

Reproduce:

g.copy_collection('danube_delta', database="geodb_geodb_doors-admin", new_collection='danube_delta',  new_database="doors")
g.grant_access_to_collection('BSWQDB_1', 'geodb_doors-user', database="doors")
->  GeoDBError: {"hint":null,"details":null,"code":"P0001","message":"No sequence for collection doors_BSWQDB_1"}

Hints for fix:
https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-serial/
https://dba.stackexchange.com/a/91658

@thomasstorm thomasstorm added the bug Something isn't working label Jan 23, 2023
@thomasstorm thomasstorm self-assigned this Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant