[postgis-users] MakePoint function

Michael Fuhr mike at fuhr.org
Thu Sep 21 18:54:26 PDT 2006


On Fri, Sep 22, 2006 at 12:22:26PM +1200, palmerj at xtra.co.nz wrote:
> Is it the expected behavor that makepoint function returns null if
> the z function parameter is passed as null?
> 
> i.e. MakePoint( x, y, NULL)

MakePoint is defined to be STRICT, also known as RETURNS NULL ON
NULL INPUT; if any NULL arguments are passed then NULL is returned
immediately without calling the function.  That seems reasonable
because a 3DZ geometry has been requested but Z is unknown.  If you
have to handle this case then you could use COALESCE to convert
NULL to a default value like 0.

-- 
Michael Fuhr



More information about the postgis-users mailing list