Re: insert

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "alan" <alan(dot)miller3(at)gmail(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: insert
Date: 2011-07-29 20:14:37
Message-ID: 4E32CE5D020000250003F8FF@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

alan <alan(dot)miller3(at)gmail(dot)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

In response to

  • insert at 2011-07-23 16:23:48 from alan

Responses

  • Re: insert at 2011-07-30 05:24:21 from Gavin Flower

Browse pgsql-performance by date

  From Date Subject
Next Message Gavin Flower 2011-07-30 01:01:25 Re: Trigger or Function
Previous Message Scott Marlowe 2011-07-29 19:54:13 Re: heavy load-high cpu itilization