pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: aalam@tatashare.com
Cc: pgsql-general@postgresql.org
Subject: Re: trigger
Date: Fri, 18 Nov 2005 13:35:44 +0000
Message-ID: <437DD8B0.6030509@archonet.com> (raw)
In-Reply-To: <001101c5ec31$c16b1420$ec1010ac@aftabn463>
References: <001101c5ec31$c16b1420$ec1010ac@aftabn463>

Aftab Alam wrote:
> Hello,
> 
> I want to create a trigger in PostgresSQL
> 
> In trigger, Before inserting the record, if data is already in the table,
> the trigger fire the mesaage that data is already there, and after that
> trigger ckeck for next insert statement.

Aftab - can you explain in some more detail. Raising an error on an 
insert will happen automatically if you violate a unique constraing.

What is this "next insert statment" you're talking about?

-- 
   Richard Huxton
   Archonet Ltd



view thread (47+ messages)  latest in thread

Message-ID: <437DD8B0.6030509@archonet.com>
Permalink:  ../437DD8B0.6030509@archonet.com/
Also on:    postgresql.org/message-id/437DD8B0.6030509@archonet.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: dev@archonet.com, aalam@tatashare.com
  Subject: Re: trigger
  In-Reply-To: <437DD8B0.6030509@archonet.com>
  References: <001101c5ec31$c16b1420$ec1010ac@aftabn463> <437DD8B0.6030509@archonet.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