Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Bill Cunningham
I apologize if this is sent twice. The simplest solution would be to use a view over the data hiding the mess of the case statement so that ad-hoc users' queries would still work. - Bill Bob Smith, Hammett & Edison, Inc. wrote: >On Thu, Dec 20, 2001, 18:55:18 Tom Lane wrote: > >>[EMAIL PROTE

Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Tom Lane
[EMAIL PROTECTED] (Bob Smith, Hammett & Edison, Inc.) writes: > Here is the problem I'm trying to solve, perhaps someone can help. > For an invoicing system database, I have a table that defines > employees. Each has a begin and end date defining the employment > period. For current employees, t

Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Bob Smith, Hammett & Edison, Inc.
On Thu, Dec 20, 2001, 18:55:18 Tom Lane wrote: >[EMAIL PROTECTED] (Bob Smith, Hammett & Edison, Inc.) writes: >> On a related note, does anyone know if 'current' works with DATE? > >DATE does not have an internal representation of 'current', so the DATE >input parser treats it the same as 'now'.

Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Stephan Szabo
On Thu, 20 Dec 2001, Bruno Wolff III wrote: > On Thu, Dec 20, 2001 at 04:24:33PM -0800, > "Bob Smith, Hammett & Edison, Inc." <[EMAIL PROTECTED]> wrote: > > See example below of using NULL values with type DATE. It behaves > > strangely in expressions, "(x <> null)" gives an entirely differen

Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Tom Lane
[EMAIL PROTECTED] (Bob Smith, Hammett & Edison, Inc.) writes: > On a related note, does anyone know if 'current' works with DATE? DATE does not have an internal representation of 'current', so the DATE input parser treats it the same as 'now'. AFAIR only timestamp (nee datetime) has that concept

Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Phill Kenoyer
I think that this page will explain it all: http://www.postgresql.org/idocs/index.php?functions-comparison.html |On 011220 17:05 |Bob Smith, Hammett & Edison, Inc. ([EMAIL PROTECTED]) wrote the following... | |See example below of using NULL values with type DATE. It behaves |strangely in expres

Re: [ADMIN] Odd behavior with NULL value

2001-12-20 Thread Bruno Wolff III
On Thu, Dec 20, 2001 at 04:24:33PM -0800, "Bob Smith, Hammett & Edison, Inc." <[EMAIL PROTECTED]> wrote: > See example below of using NULL values with type DATE. It behaves > strangely in expressions, "(x <> null)" gives an entirely different > result than "not(x = null)". Is this intended beh