Re: query - Mailing list pgsql-sql

From JuanCri
Subject Re: query
Date
Msg-id 1132470117.345048.64260@o13g2000cwo.googlegroups.com
Whole thread Raw
In response to query  ("Aftab Alam" <aalam@tatashare.com>)
List pgsql-sql
First, INSERT statements are 1 to 1 with table rows... (unless you use
a insert/select).

Second, if you want to probe that.. it is better to create an UNIQUE
index.. isn't it?

Ok, if that's not enough for you... you can create a trigger that
perform a SELECT COUNT(*) with the criteria and if it's > 0, you rise
an exception (sorry, I don't have access to a databae now to check the
code).

Juan C. Olivares
www.juancri.com



pgsql-sql by date:

Previous
From: "JuanCri"
Date:
Subject: Re: Is it possible to redirect an update/insert/delete to a different table?
Next
From: Rob
Date:
Subject: Storing HTML in table