Re: trigger - Mailing list pgsql-general

From Richard Huxton
Subject Re: trigger
Date
Msg-id 437DD8B0.6030509@archonet.com
Whole thread Raw
In response to trigger  ("Aftab Alam" <aalam@tatashare.com>)
Responses Re: trigger  ("Aftab Alam" <aalam@tatashare.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: Moving from MySQL to PostgreSQL with Ruby on Rails.
Next
From: Jaime Casanova
Date:
Subject: Re: shorter way to get new value of serial?