From: Kevin Grittner
Subject: Re: insert
Date: ,
(view: Whole thread, Raw)
In response to: insert  (alan)
Responses: Re: insert  (Gavin Flower)
List: pgsql-performance

alan <> wrote:

> Can I write a BEFORE ROW trigger for the products table  to runs
> on INSERT or UPDATE to
>  1. insert a new category & return the new category_id  OR
>  2.  return the existing category_id for the (to be inserted row)

What would you be using to match an existing category?  If this
accurately identifies a category, why not use it for the key to the
category table, rather than generating a synthetic key value?


pgsql-performance by date:

From: "Kevin Grittner"
Subject: Re: insert
From: Robert Klemme
Subject: Re: Performance penalty when using WITH