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

From Tom Lane
Subject Re: NULLs and composite types
Date
Msg-id 3726.1386892654@sss.pgh.pa.us
Whole thread Raw
In response to Re: NULLs and composite types  ("Dean Gibson (DB Administrator)" <postgresql@ultimeth.com>)
Responses Re: NULLs and composite types
List pgsql-sql
"Dean Gibson (DB Administrator)" <postgresql@ultimeth.com> writes:
> However, my problem is not that the comparison tests produce different 
> results;  that's just a symptom.  My problem is that PostgreSQL is 
> *changing* a NULL record value, to a record with NULLs for the component 
> values, when I attempt to INSERT or UPDATE it into a different field.  

I don't think there is any mechanism in core Postgres that would do that.

plpgsql, however, is a different story.  It has two different methods for
representing composite-type variables, and only one of those is capable of
representing a a "simple NULL" record value.  So I suspect what is
happening is that one of your plpgsql trigger functions is doing something
with the location field that causes it to become a row-of-nulls.  You've
not shown us enough detail to pinpoint the problem though.
        regards, tom lane



pgsql-sql by date:

Previous
From: "Dean Gibson (DB Administrator)"
Date:
Subject: Re: NULLs and composite types
Next
From: "Dean Gibson (DB Administrator)"
Date:
Subject: Re: NULLs and composite types