Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrG8V-0003Sw-Bc for pgsql-sql@arkaria.postgresql.org; Thu, 12 Dec 2013 23:57:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VrG8U-0002e0-Mz for pgsql-sql@arkaria.postgresql.org; Thu, 12 Dec 2013 23:57:42 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrG8T-0002dt-Lg for pgsql-sql@postgresql.org; Thu, 12 Dec 2013 23:57:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrG8N-0002mP-7J for pgsql-sql@postgresql.org; Thu, 12 Dec 2013 23:57:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rBCNvYqI003727; Thu, 12 Dec 2013 18:57:34 -0500 From: Tom Lane To: "Dean Gibson (DB Administrator)" cc: pgsql-sql@postgresql.org Subject: Re: NULLs and composite types In-reply-to: <52AA3156.20902@ultimeth.com> References: <52A9010D.3070202@ultimeth.com> <1386876331115-5783187.post@n5.nabble.com> <52AA3156.20902@ultimeth.com> Comments: In-reply-to "Dean Gibson (DB Administrator)" message dated "Thu, 12 Dec 2013 13:57:42 -0800" Date: Thu, 12 Dec 2013 18:57:34 -0500 Message-ID: <3726.1386892654@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org "Dean Gibson (DB Administrator)" 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 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql