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

non-integer constant in GROUP BY #11

Open
kit-ty-kate opened this issue Dec 23, 2013 · 1 comment
Open

non-integer constant in GROUP BY #11

kit-ty-kate opened this issue Dec 23, 2013 · 1 comment
Assignees

Comments

@kit-ty-kate
Copy link
Member

A macaque query like:

group {} by {test = null} …

is accepted but rejected by postgresql with the following error message:
ERROR: 42601: non-integer constant in GROUP BY

@ghost ghost assigned gasche Dec 23, 2013
@gasche
Copy link
Contributor

gasche commented Dec 23, 2013

SQL group-by queries have a well-defined general semantics, but actually use strange heuristics to decide what can and cannot be grouped over. I'm not quite sure how to handle this. One possibility would be to use a syntactical test to forbid any kind of expressions other than field accesses in the by part, but this removes useful use-case with, indeed, integer computations. Maybe the Postgresql criterion could be emulated in a more fine-grained way, but that won't be portable at all.

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

No branches or pull requests

2 participants