Re: [HACKERS] Upgrades for 6.4.1

Поиск
Список
Период
Сортировка
От Clark Evans
Тема Re: [HACKERS] Upgrades for 6.4.1
Дата
Msg-id 367C0D17.2C129291@manhattanproject.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Upgrades for 6.4.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hope you don't mind my feedback on this one.  If so, 
I'll stick to the general list.

> play=> SELECT DISTINCT i FROM dtest ORDER BY j;

> I don't know whether the SQL standard defines how this combination of
> features ought to work ... but our current behavior seems fairly
> surprising...

It suprised me.  Perhaps the query should be re-written using 
a from "select clause" (which is an instant view) on it's way 
down the pipe, like:

SELECT DISTINCT i FROM (SELECT i FROM dest ORDER BY j);


> More to the point, what possible use would a column constrained to NULL
> be?  Might as well just not have it in the table...

Backward compatibility with a client appliation (which has the 
column hard coded in a select statement), only you want to make 
sure that it isn't used...  I've actually done this in real life.  
The client was deployed to thousands of users, and was being phased
out, yet we had to support some reporting it did.  
*shudder*  Don't remind me.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Stupor Genius"
Дата:
Сообщение: RE: [HACKERS] Upgrades for 6.4.1
Следующее
От: Clark Evans
Дата:
Сообщение: SELECT DISTINCT i FROM dtest ORDER BY j