Re: Does having a NULL column automatically exclude the table from the tupleDesc cache?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ryan Murphy <ryanfmurphy(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Does having a NULL column automatically exclude the table from the tupleDesc cache?
Date: 2017-02-15 17:16:46
Message-ID: 16777.1487179006@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ryan Murphy <ryanfmurphy(at)gmail(dot)com> writes:
> My question is this: HeapTupleNoNulls() is run first to see if there are
> any columns that can be NULL. It looks like the fetchatt() that uses the
> cache in the tupleDesc can only be used if there are no NULLable columns in
> the table. Is my understanding correct?

No, that tests whether the particular tuple contains any null fields, not
whether the whole table is declared NOT NULL.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Murphy 2017-02-15 17:24:14 Re: Does having a NULL column automatically exclude the table from the tupleDesc cache?
Previous Message Robert Haas 2017-02-15 17:16:36 Re: [PATCH] Fix pg_proc comment grammar