Skip site navigation (1) Skip section navigation (2)

Re: BUG #6774: FOR IN SELECT LOOP ignores ORDER BY

From: Boris Folgmann <boris(at)folgmann(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6774: FOR IN SELECT LOOP ignores ORDER BY
Date: 2012-07-30 09:56:35
Message-ID: jv5lok$1bmr$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,

hubert depesz lubaczewski schrieb/wrote:
> generally - order by datname is understood as "order by *variable
> datname*". - which is null.

It's clear that it's a shadowing problem. But it's not a "FOR IN EXECUTE" 
where a variable makes sense. I mean why is a "ORDER BY variable" valid in 
"FOR IN"? In SQL you can't use ORDER BY NULL. If the order by clause is not 
correct the whole statement should raise an error.

Tnx,
       Boris


In response to

Responses

pgsql-bugs by date

Next:From: andervalbhDate: 2012-07-30 13:15:37
Subject: BUG #6785: Memory Leak in plpgsql
Previous:From: Emcisc (JinWei) ZhaoDate: 2012-07-30 03:49:55
Subject: Error on pg_settings.bytea_output for pg9.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group