Re: NULLs and composite types - Mailing list pgsql-sql

From David Johnston
Subject Re: NULLs and composite types
Date
Msg-id 1386876331115-5783187.post@n5.nabble.com
Whole thread Raw
In response to NULLs and composite types  ("Dean Gibson (DB Administrator)" <postgresql@ultimeth.com>)
Responses Re: NULLs and composite types
List pgsql-sql
Dean Gibson (DB Administrator)-2 wrote
> What's going on?  I can provide more detail if requested.  Of course, an 
> obvious workaround is to use in a VIEW:
> 
> ... NULLIF( location, ROW( NULL, NULL )::"GeoPosition" ) ...
> 
> but I'd like to know the cause.

Cannot test right now but the core issue is that IS NULL on a record type
evaluates both the scalar whole and the sub-components.  Try using IS [NOT]
DISTINCT FROM with various target expressions and see if you can get
something more sane.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/NULLs-and-composite-types-tp5783027p5783187.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



pgsql-sql by date:

Previous
From: Vick Khera
Date:
Subject: Re: [GENERAL] Scheduled Events
Next
From: "Dean Gibson (DB Administrator)"
Date:
Subject: Re: NULLs and composite types