From: JuanCri <juancri@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: query
Date: 19 Nov 2005 23:01:57 -0800
Message-ID: <1132470117.345048.64260@o13g2000cwo.googlegroups.com> (raw)
In-Reply-To: <001301c5ec00$7b25b0f0$ec1010ac@aftabn463>
References: <001301c5ec00$7b25b0f0$ec1010ac@aftabn463>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: juancri@gmail.com
Subject: Re: query
In-Reply-To: <1132470117.345048.64260@o13g2000cwo.googlegroups.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox