Re: insert - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: insert
Date
Msg-id 4E32CE5D020000250003F8FF@gw.wicourts.gov
Whole thread Raw
In response to insert  (alan <alan.miller3@gmail.com>)
Responses Re: insert
List pgsql-performance
alan <alan.miller3@gmail.com> 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?

-Kevin

pgsql-performance by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: heavy load-high cpu itilization
Next
From: Robert Klemme
Date:
Subject: Re: Performance penalty when using WITH