Disabling inferred "group by" columns in 9.1?

Started by Evan D. Hoffmanover 13 years ago6 messagesgeneral
Jump to latest
#1Evan D. Hoffman
evandhoffman@gmail.com

Is there any way to disable the guessing of missing columns in a
group-by (the feature added in 9.1)? I haven't found any option but I
might not be searching for the right thing.

http://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.1#SQL_and_PL.2FPgSQL_features

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Evan D. Hoffman (#1)
Re: Disabling inferred "group by" columns in 9.1?

"Evan D. Hoffman" <evandhoffman@gmail.com> writes:

Is there any way to disable the guessing of missing columns in a
group-by (the feature added in 9.1)?

Why would you want to do that? There's no "guessing" involved: the
behavior is always correct, and it is required by the SQL standard.

regards, tom lane

#3Evan D. Hoffman
evandhoffman@gmail.com
In reply to: Tom Lane (#2)
Re: Disabling inferred "group by" columns in 9.1?

Because we have both 9.0 and 9.1 running, and a query that succeeds
under 9.1 was failing under 9.0. Can I assume the answer then is
"no"?

Show quoted text

On Thu, Oct 11, 2012 at 2:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Evan D. Hoffman" <evandhoffman@gmail.com> writes:

Is there any way to disable the guessing of missing columns in a
group-by (the feature added in 9.1)?

Why would you want to do that? There's no "guessing" involved: the
behavior is always correct, and it is required by the SQL standard.

regards, tom lane

#4Thomas Kellerer
spam_eater@gmx.net
In reply to: Evan D. Hoffman (#3)
Re: Disabling inferred "group by" columns in 9.1?

Evan D. Hoffman wrote on 11.10.2012 20:54:

Is there any way to disable the guessing of missing columns in a
group-by (the feature added in 9.1)?

Because we have both 9.0 and 9.1 running, and a query that succeeds
under 9.1 was failing under 9.0. Can I assume the answer then is
"no"?

If you cannot upgrade the 9.0 installation, the only way how you can solve that problem is to develop the statements using 9.0

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Evan D. Hoffman (#3)
Re: Disabling inferred "group by" columns in 9.1?

"Evan D. Hoffman" <evandhoffman@gmail.com> writes:

Because we have both 9.0 and 9.1 running, and a query that succeeds
under 9.1 was failing under 9.0. Can I assume the answer then is
"no"?

There are any number of reasons a query might work in version N and not
in N-1. If you've got requirements like that, you should be developing
on the oldest version you're worried about supporting ...

regards, tom lane

#6Evan D. Hoffman
evandhoffman@gmail.com
In reply to: Tom Lane (#5)
Re: Disabling inferred "group by" columns in 9.1?

Ok. Thanks for your help.

On Oct 11, 2012, at 3:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

"Evan D. Hoffman" <evandhoffman@gmail.com> writes:

Because we have both 9.0 and 9.1 running, and a query that succeeds
under 9.1 was failing under 9.0. Can I assume the answer then is
"no"?

There are any number of reasons a query might work in version N and not
in N-1. If you've got requirements like that, you should be developing
on the oldest version you're worried about supporting ...

regards, tom lane