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

Implement type based operator selector #25

Open
jwp opened this issue Jun 1, 2010 · 0 comments
Open

Implement type based operator selector #25

jwp opened this issue Jun 1, 2010 · 0 comments
Labels

Comments

@jwp
Copy link
Contributor

jwp commented Jun 1, 2010

Currently, there is not an easy way to get PG's binary operators' functions for a specific pair of types.

All Python operators can return arbitrary objects. We can take advantage of this by giving Postgres.Type instances operator methods that return the function associated with the corresponding PG operator:

from Postgres.types import int2, int4, int8

map(int2 < int4, [(123,5432100), ...])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant