alan <alan.mill...@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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to