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

Fix PostgresStorageAdapter Pointers not working #3464

Closed
wants to merge 1 commit into from

Conversation

mlakkadshaw
Copy link

In PostgresStorageAdapter the pointer type is declared as char[10], but if the size of the pointer is less than 10 chars, then it adds whitespace for the remaining characters, this cause the pointer to stop working

@flovilmart
Copy link
Contributor

Pointers should always be 10 chars as they are stored as their pointee's objectId. Do you have a precise case where that value is not 10 chars?

@mlakkadshaw
Copy link
Author

If the person decided to use custom IDs instead of the system generated one then it might cause problems.
The project in which I am working on, there are certain tables that have a custom objectID and they are of 3 or 5 chars and are used to store constant values that do not change, so this was causing the issue with populating as Postgres was adding whitespace for the remaining characters.
If we store Pointer as an array of 10 chars then it would not be possible to use custom objectIDs with Postgres.

@flovilmart
Copy link
Contributor

Custom id's should always be 10 chars, also, note that this will completetly fail as you'll need to alter the tables and there is no upgrade strategy to alter all tables.

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.

3 participants