order by and view def.

Started by salah jubehalmost 15 years ago2 messagesgeneral
Jump to latest
#1salah jubeh
s_jubeh@yahoo.com

Hello,

There is something strange with the views definitions, I have "order by"
statement amended to the views where the view is ordered by all the columns in
the view. Is this a common behavior?

Ps: I am using postgresql 8.3

Regards

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: salah jubeh (#1)
Re: order by and view def.

salah jubeh <s_jubeh@yahoo.com> writes:

There is something strange with the views definitions, I have "order by"
statement amended to the views where the view is ordered by all the columns in
the view. Is this a common behavior?

Ps: I am using postgresql 8.3

If the views use SELECT DISTINCT, PG versions before 8.4 will force all
the DISTINCT columns to appear in the sort list. That's an
implementation detail we got rid of in 8.4 ...

regards, tom lane