pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Harald Fuchs <hf118@protecting.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Trigger question
Date: Tue, 20 Jan 2004 19:05:46 +0000
Message-ID: <200401201905.46699.dev@archonet.com> (raw)
In-Reply-To: <24605.1074616950@sss.pgh.pa.us>
References: <400691EA.96598C34@t1.unisoftbg.com>
	<pufzea4mvw.fsf@srv.protecting.net>
	<24605.1074616950@sss.pgh.pa.us>

On Tuesday 20 January 2004 16:42, Tom Lane wrote:
> Harald Fuchs <hf118@protecting.net> writes:
> > Why?  If the underlying table has a primary key, finding corresponding
> > pairs is trivial; if there isn't, it's impossible.
>
> Exactly.  Nonetheless, the correspondence exists --- the UPDATE
> definitely updated some particular row of the OLD set into some
> particular one of the NEW set.  If the trigger API makes it impossible
> to reconstruct the matchup, the API is broken.

Perhaps they should be cursors? The only sensible way I can think of working 
with them would be:
1. count how many rows affected
2. step through one row at a time, doing something.

I suppose there might be cases where you'd want to GROUP BY... which would 
mean you'd need some oid/row-id added to a "real" recordset.

-- 
  Richard Huxton
  Archonet Ltd



view thread (15+ messages)  latest in thread

Message-ID: <200401201905.46699.dev@archonet.com>
Permalink:  ../200401201905.46699.dev@archonet.com/
Also on:    postgresql.org/message-id/200401201905.46699.dev@archonet.com

 · 

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-performance@postgresql.org
  Cc: dev@archonet.com, tgl@sss.pgh.pa.us, hf118@protecting.net
  Subject: Re: Trigger question
  In-Reply-To: <200401201905.46699.dev@archonet.com>

* 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