Skip to content

Conversation

@albertov
Copy link
Contributor

I'm in the process of implementing a library to create PostgreSQL full text search queries using Esqueleto (https://github.com/albertov/esqueleto-textsearch) and I need to create PersistField instance for postgres' tsvector, regconfig and tsquery types. I was tempted to add another set of converters for these types in builtInExtensionGetters but since it's not the first time I've done this (see #313) I think a more future-proof solution would be to treat all unknown oids as PersistDbSpecific values and let the PersistField instances parse them as they see fit.

@snoyberg
Copy link
Member

@meteficha Since (I believe) you wrote this code originally, do you have any thoughts on this change?

@meteficha
Copy link
Member

IIUC, this pull request is reverting most of e0413f5, which will bring us to the state we were at afea41e. I've never used this stuff, but it seems @albertov knows what he's doing since he's the author of both commits above :).

I just don't understand why we should keep things like (k PS.uuid, convertPV (PersistDbSpecific . unUnknown)) on builtinGetters since this is becoming the default behavior.

@albertov
Copy link
Contributor Author

@meteficha, Indeed, we're almost going back full circle :) I guess my rationale for e0413f5 was to be more explicit but now that I need access to more types I think it's better to map to a PersistDbSpecific any unknown oids (which semantically makes sense since they're actually database-specific types) instead of going through the update builtInExtensionGetters + PR + version bump + release cycle every time someone needs to do something special with non-conventional types.

Regarding the the redundancy in builtinGetters I'm +1 on removing it. I can update the PR if y'all ok with it too.

snoyberg added a commit that referenced this pull request Apr 16, 2015
Treat unknown extension types as PersistDbSpecific values
@snoyberg snoyberg merged commit af1fae3 into yesodweb:master Apr 16, 2015
@snoyberg
Copy link
Member

Merged, thanks!

snoyberg added a commit that referenced this pull request Apr 16, 2015
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