pgsql: Make equalTupleDescs() compare attlen/attbyval/attalign rather

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make equalTupleDescs() compare attlen/attbyval/attalign rather
Date: 2005-04-14 22:34:49
Message-ID: 20050414223449.2AEE053661@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Make equalTupleDescs() compare attlen/attbyval/attalign rather than
assuming comparison of atttypid is sufficient. In a dropped column
atttypid will be 0, and we'd better check the physical-storage data
to make sure the tupdescs are physically compatible.
I do not believe there is a real risk before 8.0, since before that
we only used this routine to compare successive states of the tupdesc
for a particular relation. But 8.0's typcache.c might be comparing
arbitrary tupdescs so we'd better play it safer.

Modified Files:
--------------
pgsql/src/backend/access/common:
tupdesc.c (r1.110 -> r1.111)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/common/tupdesc.c.diff?r1=1.110&r2=1.111)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-04-14 22:35:13 pgsql: Make equalTupleDescs() compare attlen/attbyval/attalign rather
Previous Message Tom Lane 2005-04-14 22:09:40 pgsql: Put back blessing of record-function tupledesc, which I removed