pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kovacs Baldvin <kb136@hszk.bme.hu>
Cc: Jan Wieck <JanWieck@Yahoo.com>
Cc: Kevin Way <kevin.way@overtone.org>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [SQL] CHECK problem really OK now...
Date: Wed, 26 Sep 2001 14:36:58 -0400
Message-ID: <6107.1001529418@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.GSO.4.33.0109242027010.2078-100000@ural2>
References: <Pine.GSO.4.33.0109242027010.2078-100000@ural2>

Kovacs Baldvin <kb136@hszk.bme.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



view thread (5+ messages)

Message-ID: <6107.1001529418@sss.pgh.pa.us>
Permalink:  ../6107.1001529418@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6107.1001529418@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kb136@hszk.bme.hu, JanWieck@Yahoo.com, kevin.way@overtone.org, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] CHECK problem really OK now...
  In-Reply-To: <6107.1001529418@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox