Re: [GENERAL] Sorting nulls and empty strings together

2008-04-29 Thread Gregory Stark
"Andrus" <[EMAIL PROTECTED]> writes: > User interface need to show nulls as empty strings. > PostgreSQL sorts nulls after all data. >... > Select statements are generated dynamically by driver and it is not easy > to change them to generate order by coalesce( testcol,''). You could use NULLS FIRS

Re: [GENERAL] Sorting nulls and empty strings together

2008-04-29 Thread Martijn van Oosterhout
On Mon, Apr 28, 2008 at 08:05:45PM +0300, Andrus wrote: > User interface need to show nulls as empty strings. > PostgreSQL sorts nulls after all data. > > create temp table test ( testcol char(10) ); > insert into test values ( null); > insert into test values ( 'test'); > insert into test values

[GENERAL] Sorting nulls and empty strings together

2008-04-29 Thread Andrus
User interface need to show nulls as empty strings. PostgreSQL sorts nulls after all data. create temp table test ( testcol char(10) ); insert into test values ( null); insert into test values ( 'test'); insert into test values ( ''); select * from test order by testcol; This confuses users who e

Re: [GENERAL] Sorting nulls and empty strings together

2008-04-28 Thread Dennis Muhlestein
Andrus wrote: User interface need to show nulls as empty strings. PostgreSQL sorts nulls after all data. create temp table test ( testcol char(10) ); insert into test values ( null); insert into test values ( 'test'); insert into test values ( ''); select * from test order by testcol; This conf