Re: [SQL] CHECK problem really OK now...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kovacs Baldvin <kb136(at)hszk(dot)bme(dot)hu>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, Kevin Way <kevin(dot)way(at)overtone(dot)org>, pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [SQL] CHECK problem really OK now...
Date: 2001-09-26 18:36:58
Message-ID: 6107.1001529418@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Kovacs Baldvin <kb136(at)hszk(dot)bme(dot)hu> writes:
> I tried, and it works: the current CVS version really runs
> happily the query what sent to heaven our 7.1 version of the
> backend.

I believe this traces to a fix I made in May:

2001-05-27 16:48 tgl

* src/: backend/executor/execJunk.c, backend/executor/execMain.c,
include/executor/executor.h, include/nodes/execnodes.h: When using
a junkfilter, the output tuple should NOT be stored back into the
same tuple slot that the raw tuple came from, because that slot has
the wrong tuple descriptor. Store it into its own slot with the
correct descriptor, instead. This repairs problems with SPI
functions seeing inappropriate tuple descriptors --- for example,
plpgsql code failing to cope with SELECT FOR UPDATE.

I didn't realize at the time that the error would also affect updates of
child tables, but tracing through your example with 7.1 shows clearly
that the CHECK is being applied to a slot that contains a four-column
tuple and only a three-column descriptor. Ooops.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2001-09-26 19:10:36 Re: PgAdmin for 7.1.3
Previous Message wsheldah 2001-09-26 18:29:35 Re: Double Quoting Table Names????

Browse pgsql-hackers by date

  From Date Subject
Next Message D. Hageman 2001-09-26 18:40:46 Re: Spinlock performance improvement proposal
Previous Message Patrice Hédé 2001-09-26 18:23:33 Combining chars in psql (pre-patch)

Browse pgsql-sql by date

  From Date Subject
Next Message Frederick Klauschen 2001-09-26 18:45:45 Query does not work: parse ERROR, Re: How to enter lists into database: Problems with solution.
Previous Message Josh Berkus 2001-09-26 17:40:26 Re: How to enter lists into database: Problems with solution.