-
Notifications
You must be signed in to change notification settings - Fork 301
Added oid of postgis2 geometry #313
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
Conversation
…es instead of oids since these are not stable across databases for extension types
|
Another version of postgis reports another oid for geometry, 16396. This approach does not seem scalable. Perhaps theres a more portable way of doing this? Or maybe map every unknown oid to PersistentDbSpecific and let the PersistentField instance decide how to handle it? |
|
I don't know the right way to handle this, it's really beyond my expertise with PostgreSQL. |
|
According to Database.PostgreSQL.Simple.FromField's docs:
So it confirms that hardcoding the oid of extension types is doomed to failure. Another way to support extension types could be by using the aforementioned typename that fname returns instead of the oid to dispatch (modifying However, I believe that mapping any unknown oid to a PersistentDbSpecific bytestring (as done in afea41e) is a better approach since any binary extension type can be supported this way provided a Thoughts? |
|
I think that makes sense, though I'll admit that I'm a bit hazy on the details of what's going on here. If it works for your use case, and doesn't break the tests, I think it's OK to merge it in. |
|
Let me rephrase that last one: can you confirm that this commit/PR solves the issue for you? |
|
Oh, sorry if it wasn't clear. Yes it does. It's a fix I needed when trying to talk with the DB in production which has a different oid than the one i'm developing against and the one in travis (which motivated this PR) |
|
Can you try running the persistent-test test suite with the |
|
It also segfaults (randomly) on my system inside
However, it appears unrelated to this PR since the same segfault (ie: insisde |
Added oid of postgis2 geometry
|
I'm merging this in now, thank you. From what I can tell, it's working. I'll hold off on releasing until we resolve the segfault issue, and then can be more certain now regressions have been introduced. |
|
Thanks! |
It seems newer version of postgis use 16393 as oid for geometry. See https://travis-ci.org/meteogrid/sigym4-geometry-persistent/builds/38037818#L959